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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With