clarkk
clarkk

Reputation: 27723

How to reduce PDF filesize

I got alot of PDF files and some of them are quite large..

I got two alternatives

  1. remove images and remove embedded fonts
  2. compress images

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

Answers (2)

mark stephens
mark stephens

Reputation: 3184

Lots of tools, including Acrobat can improve the file size by looking for optimizations such as

  • dead objects
  • raw image data at an unnecessary resolution.

Have you looked at any of these tools?

Upvotes: -3

Daniele
Daniele

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

Related Questions