Compress PDF API
Compress and reduce a PDF file size by up to 90%
PDF compressor API reduces file size while optimizing for maximal PDF quality by compressing text, graphics, and images, subsetting fonts, and optimizing document structure.
Choose compression level from presets. If preset is selected all other compression options are ignored.
Color image compression quality. The parameter applies only to JPX and JPG compressions.
Enable Bicubic image downsampling and decreases the number of pixels in the color image which in turn makes the file smaller.
Threshold in DPI to activate color images resampling. ColorImageDownsample property must be enabled.
Color image resolution in DPI after Bicubic resampling. ColorImageDownsample property must be enabled.
Grayscale image compression quality. The parameter applies only to JPX and JPG compressions.
Enable Bicubic image downsampling and decreases the number of pixels in the grayscale image which in turn makes the file smaller.
Threshold in DPI to activate grayscale images resampling. GrayscaleImageDownsample property must be enabled.
Grayscale image resolution in DPI after Bicubic resampling. GrayscaleImageDownsample property must be enabled.
Monochrome image compression quality. The parameter applies only to jbig2 and jbig2l compressions.
Enable Bicubic image downsampling and decreases the number of pixels in the monochrome image which in turn makes the file smaller.
Threshold in DPI to activate Monochrome images resampling. MonochromeImageDownsample property must be enabled.
Monochrome image resolution in DPI after Bicubic resampling. MonochromeImageDownsample property must be enabled.
Remove piece information dictionaries like Adobe Illustrator or Photoshop private data.
Output PDF should only contain font characters utilized in the original document, and any unused glyphs from all fonts in the document should be removed.
Create object streams in the PDF file. An object stream represents a stream that contains a sequence of PDF objects. This allows a greater number of PDF objects to be compressed. Property compatible with Acrobat 6/PDF v1.5 and later.
Code snippet
// Code snippet is using the ConvertAPI JavaScript Client: https://github.com/ConvertAPI/convertapi-js
// Code snippet is using the ConvertAPI Node.js Client: https://github.com/ConvertAPI/convertapi-nodejs
// Code snippet is using the ConvertAPI PHP Client: https://github.com/ConvertAPI/convertapi-php
// Code snippet is using the ConvertAPI Java Client: https://github.com/ConvertAPI/convertapi-java
// Code snippet is using the ConvertAPI C# Client: https://github.com/ConvertAPI/convertapi-dotnet
# Code snippet is using the ConvertAPI Ruby Client: https://github.com/ConvertAPI/convertapi-ruby
# Code snippet is using the ConvertAPI Python Client: https://github.com/ConvertAPI/convertapi-python
// Code snippet is using the ConvertAPI Go Client: https://github.com/ConvertAPI/convertapi-go
REM Code snippet is using the command line utility program: https://github.com/ConvertAPI/convertapi-cli
<!-- For conversions with the multiple file result please refer to this example: https://repl.it/@ConvertAPI/HTML-Form-with-multiple-file-result -->
Resources
In addition to the interactive code snippet above, we wrote some useful articles about the PDF to COMPRESS conversion. Read more about the converter, integration and advanced techniques in the articles below: