Doppelseite aus PDF als JPG

PDF in Doppelseiten-JPG wandeln. Die Programme stammen aus den Paketen pdftk, texlive-extra-utils und ImageMagick.


INPUT=Input.pdf
OUTPUT=Output.jpg
PAGE1=152 # Page in PDF, not numbered page
PAGE2=153
pdftk $INPUT cat $PAGE1-$PAGE2 output tt1.pdf
pdfcrop --margins "-28 -15 -28 -15" tt1.pdf tt2.pdf # crop margins in pt (1 pt = 0.35277mm)
montage -density 1200 tt2.pdf -mode Concatenate -tile 2x1 -quality 80 -resize 20% $OUTPUT
rm tt[12].pdf