ImageMagick: Re-compressing images in PDF

Step-by-Step descriptions of how to do things.

ImageMagick: Re-compressing images in PDF

Postby peter_b » Wed Nov 16, 2016 8:18 pm

I've recently received PDF files solely as access copy for reviewing some textual content, but they had too many images in way too high resolution in them.
This caused these PDFs to become almost unreadable even on a modern computer.

Here's how you "resize" (actually re-compress) a PDF to PDF with ImageMagick:
Code: Select all
$ convert -density 300x300 -quality 80 -compress  jpeg input.pdf output.pdf


Options:
  • density: This is the target resolution for images (in DPI) for width/height.
  • quality: For JPEG it's 1-100, where 100 is best quality (=largest file). For other compression formats see ImageMagic documentation: "-quality".

Links:
  • 0

User avatar
peter_b
Chatterbox
 
Posts: 308
Joined: Tue Nov 12, 2013 2:05 am
Reputation: 3

Return to HowTo's

Who is online

Users browsing this forum: No registered users and 1 guest

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: No registered users and 12 guests

cron
Reputation System ©'