Compress PDF Guide
Learn to develop your own PDF compression software to automatically reduce the size of PDF files.
You may have seen how compress works in previous guides, it is very easy as you will see in this code:
You can add as many files as you want to compress. To process your files, simply choose the Compress PDF tool.
You can choose between 3 compression levels. By default, these are set as the recommended compression levels in order to achieve the best ratio between file size and visual quality of the document.
Simply set the property compression_level with your desired level of compression like this:
These are the following levels to choose from:
- low compress the pdf with a minimal compression to gain some KB without quality loss.
- recommended compress the pdf with the best mix of compression and quality standards.
- extreme compress the pdf in order to reduce the maximum amount of data. This can cause quality loss and it is not recommended for PDFs where images and pictures are important.
The REST API combines several algorithms to try to compress all your files with the highest compression according to the chosen compression level.