Tweak ocr-image.sh

This commit is contained in:
polyfloyd 2025-07-01 19:52:46 +02:00
parent 5344c5b978
commit cd22a1f4c9

View file

@ -2,8 +2,5 @@
in=$1 in=$1
out=$(dirname "$in")/$(basename -- "$in" ".${in##*.}").pdf out=$(dirname "$in")/$(basename -- "$in" ".${in##*.}").pdf
tmp=$(mktemp --suffix=.pdf)
magick "$in" "$tmp" img2pdf --auto-orient "$in" | ocrmypdf --language eng+nld --tesseract-pagesegmode 11 - "$out"
ocrmypdf $tmp "$out"
rm "$tmp"