Compress PDF API
Compress and reduce a PDF file size by up to 90%
Compress PDF features
The Compress PDF API by ConvertAPI is a tool that allows for the compression and reduction of PDF file sizes by up to 90%. This API optimizes PDF quality by compressing text, graphics, images, subsetting fonts, and optimizing document structure. It offers various parameters for customization, including compression presets, color and grayscale image compression, and options to remove elements like bookmarks, annotations, forms, and embedded files from the PDF. The API also provides options for optimizing the PDF for web viewing and preserving the PDF/A standard.
API Endpoint
ConvertAPI offers a cloud-based solution, which makes Compress PDF conversion effortless with just a single REST-API call:
Authenticate your API call
Converting pdf to compress via REST-API is now easier than ever. Sign up for a free account to obtain your authentication secret, append it as a query string parameter to the conversion URL, and voilĂ ! You can find advanced authentication techniques in our docs.
Compress PDF using REST-API in no time!
Once you have your authentication in place, you can convert your files using application/json
, multipart/form-data
and application/octet-stream
content types.
A simple HTTP POST request using JSON would look like this:
Conversion request using cURL
You can easily convert pdf to compress with a simple cURL request. Our documentation provides more advanced cURL request techniques.
File conversion using CLI
ConvertAPI CLI allows you to convert files using our command-line file conversion utility tool. Check out CLI documentation for a detailed explanation and usage examples.
Try the conversion online - no coding required!
You can try out advanced conversion parameters and test the conversion result online using our interactive demo tool. This tool will produce the same conversion output as if you were using the library from your solution, and it will auto-generate the code snippet for you!
Try for FREE!Conversion parameters
Sets the password to open protected documents.
Choose compression level from presets. If preset is selected all other compression options are ignored.
Values: none text archive web ebook printer
Color image compression algorithm.
Values: none jpg jpx zip
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 algorithm.
Values: none jpg jpx zip
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 algorithm.
Values: none jbig2 jbig2l fax zip
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 bookmarks from the PDF file.
Remove text annotations from the PDF file.
Remove PDF forms from the PDF file.
Remove page labels from the PDF file.
Removes hidden layers and flatten visible ones.
Remove article threads from the PDF file.
Remove tagged information from the PDF file.
Remove page thumbnails from the PDF file.
Remove duplicate fonts and color profiles from the PDF file.
Removes alternate images and leave only the one for on-screen viewing.
Remove named destinations from the PDF file.
Remove embedded/attachments files from the PDF file.
Remove piece information dictionaries like Adobe Illustrator or Photoshop private data.
Specifies whether to remove the base fonts from the PDF file.
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.
Optimize page content streams in the PDF file.
In streams that use LZW encoding, use Flate instead.
Linearize PDF file and optimize for fast Web View.
Preserve the PDF/A standard in the PDF file.