fix: determine the path of `viewjpeg.ps` in /usr/share.

removeproofs
Francesco Minnocci 5 months ago
parent 212d9013df
commit c0e71dc9d5

@ -63,11 +63,11 @@ pdftoppm -r 300 -jpeg -jpegopt "quality=$quality,optimize=y" -progress $input_fi
for f in "$temp_pages_dir"/page-*.jpg; do
logf "Wrapping $f into ${f/.jpg/.pdf}\n"
gs -dNOSAFER -sDEVICE=pdfwrite -o "${f/.jpg/.pdf}" /usr/share/ghostscript/lib/viewjpeg.ps -c "($f)" viewJPEG
gs -dNOSAFER -sDEVICE=pdfwrite -o "${f/.jpg/.pdf}" $(find -iname viewjpeg.ps /usr/share | head -1) -c "($f)" viewJPEG
done
logf "Merging compressed pages to a single PDF\n"
pdfunite "$temp_pages_dir"/page-*.pdf $output_file
rm -r "$temp_pages_dir"
logf "Done\n"
logf "Done\n"

Loading…
Cancel
Save