Reputation: 27723
I got alot of PDF files and some of them are quite large..
I got two alternatives
Is it possible to remove all objects like images/fonts in a PDF (PHP lib or command-line tool)?
Or if I want to compress images in the PDF, which PHP library do you recommend (or command-line tool)?
Debian/PHP
Upvotes: 6
Views: 18409
Reputation: 3184
Lots of tools, including Acrobat can improve the file size by looking for optimizations such as
Have you looked at any of these tools?
Upvotes: -3
Reputation: 1005
pdftk is the way to go IMO.
It can uncompress and compress the textual part of the PDF. Further you can use it in a script to extract all the images, compress them with some other tool and then put them back into your original document.
I'm not sure whether it can remove embedded fonts.
HTH
Upvotes: 2