Hello,
I am trying to figure out how to simulate the "Reduce File Size" setting in Acrobat Pro. I work with a lot of PDF files with many images which are created using the prawn ruby gem. The last two were 164MB and 417MB. Exporting them in Acrobat using the Reduce File Size setting compressed them both down to 7.5MB. I have tried reading the pdf in and then writing it to a new file and that does make a smaller file, but the quality is extremely compromised. I have tried lots of different compression types and none have produced decent quality pdf files.
Thank you for any help you can offer.
How can I reduce pdf file sizes using imagemagick?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How can I reduce pdf file sizes using imagemagick?
Imagemagick will rasterize vector PDF files and thus make them much larger. If you have a raster image in a vector shell, then you should extract the image using pdfimages, process it to compress and then add the PDF shell onto it.
See http://www.imagemagick.org/Usage/formats/#vector
Imagemagick is not a good tool for optimizing PDF images.
See http://www.imagemagick.org/Usage/formats/#vector
Imagemagick is not a good tool for optimizing PDF images.
Re: How can I reduce pdf file sizes using imagemagick?
Thank you for the feedback @fmw42. Do you happen to know of a better tool which I can achieve this with?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How can I reduce pdf file sizes using imagemagick?
I do not know of any tools specific to your task. But you can extract the image from the pdf using pdfimages. Then compress it. Then put it back into a PDF shell by converting to PDF.