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.
This article refers to a deprecated product. If you are looking for support for Foxit PDF SDK, please click here.
Updated on May 16, 2022