1. Home
  2. Foxit Quick PDF Library
  3. Can I compress my PDF?

Can I compress my PDF?

A PDF can’t be compressed like an image can be compressed. “PDF” is more of a container for various elements. So inside a PDF various things such as image data, font data, content data and so on can be compressed, but these have to be compressed separately.

If you want to reduce the file size of a PDF, then this article at Planet PDF about reducing PDF file size, will help you.

In Foxit Quick PDF Library there’s a few different functions to help you with compressing PDF files.

The CompressContent function in Quick PDF Library will allow you to reduce the file size in some cases, depending on what type of objects are in your PDF, but it won’t allow you much control over what gets compressed in the PDF — nor will it dramatically reduce the file size.

The CompressImages function will compress image data that is added to the PDF in an uncompressed state. It will not re-compress or change already compressed image data. It uses flate compression. This function should be call prior to the AddImageFrom* function call.

The CompressFonts function allows you to specify whether or not to compress TrueType, Packaged and Type1 fonts subsequently added to the document.

Updated on March 19, 2019

Was this article helpful?

Related Articles

Ready to try Foxit PDF SDK?
Click the link below to download your trial
Free Trial