Page 1 of 1

Resize pdf and retain quality

Posted: 2014-10-19T20:52:51-07:00
by nicky
I need to compress a bunch of pdf files (size between 10MB to 50MB) to smaller size, say half of the original, but I need to remain the text quality.

I tried with the code below:

Code: Select all

convert -density 50 -compress zip input.pdf output.pdf
It does compress to smaller size, but the fonts are very blur.

If i increase the density, the output size become bigger than original size.

I have also tried with -resize and -resample, but the output size always bigger than the original, and yet the texts are blur.

What did I miss in the command?

Re: Resize pdf and retain quality

Posted: 2014-10-20T02:15:58-07:00
by snibgo
IM will rasterize the PDF pages. That is, it converts (vector) text like "abc" into loads of dots, at whatever resolution you specify. If your PDF is vector text, this is almost certain to increase the file size.

Re: Resize pdf and retain quality

Posted: 2014-10-20T03:04:05-07:00
by nicky
sorry for I am new to IM and not too familiar with the command. If that's the case, does it means that IM is not too suitable in compressing pdf file?

Re: Resize pdf and retain quality

Posted: 2014-10-20T03:22:53-07:00
by snibgo
If the PDF contains vector data, IM is not a good tool for shrinking the file size.

Re: Resize pdf and retain quality

Posted: 2014-10-20T03:44:08-07:00
by nicky
The pdf file contains vector data together with images, guess I'll need to find an alternative to compress it. Alright, thanks snibgo.