Skip to Content

develCuy's blog

by Fernando Paredes García


HOWTO lossy compress PDF files in Linux

Image Magick is an awesome tool that also does a great work compressing PDF files.

Just run the following command:

$ convert -compress jpeg -density 150 file.pdf file-compressed.pdf

Notice that -compress is the compression type, and -density is the image quality. Also, JPEG compression is lossy, and reduction of DPI usually is lossy. But I managed to have good compression quality with these settings.

There are more details in the Image Magick manual.

Blessings!


I think the title is not

I think the title is not correct: Jpeg compression is lossy. Also, the reduction of DPI usually is lossy.


Thanks for your feedback,

Thanks for your feedback, blog post updated!


Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.