Say I'm scanning in images of documents with something like:

scanimage --mode Gray --resolution 300 -x 215 -y 280 --format=tiff \
    --batch=document-p%d.tiff --batch-prompt

(In the example I've used .tiff format, but I'm open to anything that works.)

What's the easiest way to compile the separate image files into a single PDF file?


Using ImageMagick is probably the easiest way:

convert document-p*.tiff output.pdf
  • Nice! It didn't even occur to me that ImageMagick would support pdf. It'll be hard to get any easier than that. – Michael Kropat Jun 11 '14 at 16:41
  • 2
    In practice I ended up running convert document-p*.tiff -compress jpeg -quality 70 document.pdf, to shrink the file size by an order of magnitude. – Michael Kropat Jun 11 '14 at 17:36

Try this.

scanimage -p --resolution 250 --mode Gray -x 210 -y 297 | pnmtops -imageheight 11.7 -imagewidth 8.3 | ps2pdf - output.pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.