add convert pdf script

This commit is contained in:
masq 2025-11-01 08:36:36 +01:00
parent 0e35a74e38
commit 6dcf5d2cfe
Signed by: masq
GPG Key ID: 35A0D64DDE13B10F

20
convert_pdf.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/bash
set -e
for i in 2025*.jpg;
do
pdfname=$(echo $i|sed 's/jpg$/pdf/')
gs \
-q \
-dNOSAFER \
-sPAPERSIZE=a4 \
-dNOPAUSE \
-dPDFSETTINGS=/printer \
-dBATCH \
-dCompressFonts=true \
-sDEVICE=pdfwrite \
-sOutputFile=$pdfname \
/usr/share/ghostscript/lib/viewjpeg.ps \
-c \
\($i\) viewJPEG showpage
done;