PDF to COMPRESS API

The API for compressing PDF files.

API Request:

Copy parameter's URL Secret Secret
Optional

String Authentication secret must be provided as a query parameter. If omitted, token must be provided.

Show all

Copy parameter's URL Token Token
Optional

String Authentication token must be provided as a query parameter. If omitted, secret must be provided.

Show all

Copy parameter's URL File File
Required

File File to be converted. Value can be URL or file content.

Show all

Copy parameter's URL StoreFile Store file
Optional

Bool Store converted file on our secure server and provides download URL.

Default: False

Show all

Copy parameter's URL FileName File name
Optional

String Converted output file name without extension. The extension will be added automatically.

Show all

Copy parameter's URL Timeout Timeout
Optional

Integer Conversion timeout in seconds.

Default: 900

Range: 10 .. 1200

Show all

Copy parameter's URL Async Asynchronous
Optional

Bool Run conversion job asynchronously.

Default: False

Show all

Copy parameter's URL JobId Job ID
Optional

String Conversion job self generated UUID (RFC 4122) used for getting conversion result asynchronously.

Show all

Copy parameter's URL WebHook WebHook
Optional

String Set WebHook URL to call after asynchronous conversion is finished. Async parameter must be enabled.

Show all

Copy parameter's URL Password Open Password
Optional

String Sets the password to open protected documents.

Show all

Copy parameter's URL ColorImageCompression Color image compression
Optional

Collection Color image compression algorithm.

Default: jpg

Values: jpg, jpx, zip, none

Show all

Copy parameter's URL ColorImageQuality Color image quality
Optional

Integer Color image compression quality. The parameter applies only to JPX and JPG compressions.

Default: 50

Range: 10 .. 100

Show all

Copy parameter's URL ColorImageDownsample Color image downsample
Optional

Bool Enable Bicubic image downsampling and decreases the number of pixels in the color image which in turn makes the file smaller.

Default: False

Show all

Copy parameter's URL ColorImageThresholdDpi Color image resample threshold
Optional

Integer Threshold in DPI to activate color images resampling. ColorImageDownsample property must be enabled.

Default: 200

Range: 72 .. 3000

Show all

Copy parameter's URL ColorImageResampleDpi Color image resample
Optional

Integer Color image resolution in DPI after Bicubic resampling. ColorImageDownsample property must be enabled.

Default: 150

Range: 10 .. 2400

Show all

Copy parameter's URL GrayscaleImageCompression Grayscale image compression
Optional

Collection Grayscale image compression algorithm.

Default: jpg

Values: jpg, jpx, zip, none

Show all

Copy parameter's URL GrayscaleImageQuality Grayscale image quality
Optional

Integer Grayscale image compression quality. The parameter applies only to JPX and JPG compressions.

Default: 50

Range: 10 .. 100

Show all

Copy parameter's URL GrayscaleImageDownsample Grayscale image downsample
Optional

Bool Enable Bicubic image downsampling and decreases the number of pixels in the grayscale image which in turn makes the file smaller.

Default: False

Show all

Copy parameter's URL GrayscaleImageThresholdDpi Grayscale image resample threshold
Optional

Integer Threshold in DPI to activate grayscale images resampling. GrayscaleImageDownsample property must be enabled.

Default: 200

Range: 72 .. 3000

Show all

Copy parameter's URL GrayscaleImageResampleDpi Grayscale image resample
Optional

Integer Grayscale image resolution in DPI after Bicubic resampling. GrayscaleImageDownsample property must be enabled.

Default: 150

Range: 10 .. 2400

Show all

Copy parameter's URL MonochromeImageCompression Monochrome image compression
Optional

Collection Monochrome image compression algorithm.

Default: jbig2l

Values: jbig2, jbig2l, fax, zip, none

Show all

Copy parameter's URL MonochromeImageQuality Monochrome image quality
Optional

Integer Monochrome image compression quality. The parameter applies only to jbig2 and jbig2l compressions.

Default: 5

Range: 1 .. 10

Show all

Copy parameter's URL MonochromeImageDownsample Monochrome image downsample
Optional

Bool Enable Bicubic image downsampling and decreases the number of pixels in the monochrome image which in turn makes the file smaller.

Default: False

Show all

Copy parameter's URL MonochromeImageThresholdDpi Monochrome image resample threshold
Optional

Integer Threshold in DPI to activate Monochrome images resampling. MonochromeImageDownsample property must be enabled.

Default: 200

Range: 100 .. 3000

Show all

Copy parameter's URL MonochromeImageResampleDpi Monochrome image resample
Optional

Integer Monochrome image resolution in DPI after Bicubic resampling. MonochromeImageDownsample property must be enabled.

Default: 150

Range: 10 .. 240

Show all

Copy parameter's URL RemoveBookmarks Remove bookmarks
Optional

Bool Remove bookmarks from the PDF file.

Default: False

Show all

Copy parameter's URL RemoveAnnotations Remove annotations
Optional

Bool Remove text annotations from the PDF file.

Default: False

Show all

Copy parameter's URL RemoveForms Remove forms
Optional

Bool Remove PDF forms from the PDF file.

Default: False

Show all

Copy parameter's URL RemovePageLabels Remove page labels
Optional

Bool Remove page labels from the PDF file.

Default: False

Show all

Copy parameter's URL RemoveLayers Remove layers
Optional

Bool Removes hidden layers and flatten visible ones.

Default: False

Show all

Copy parameter's URL RemoveArticleThreads Remove article threads
Optional

Bool Remove article threads from the PDF file.

Default: False

Show all

Copy parameter's URL RemoveTaggedInfo Remove tagged information
Optional

Bool Remove tagged information from the PDF file.

Default: True

Show all

Copy parameter's URL RemovePageThumbnails Remove page thumbnails
Optional

Bool Remove page thumbnails from the PDF file.

Default: True

Show all

Copy parameter's URL RemoveDuplicates Remove duplicates
Optional

Bool Remove duplicate fonts and color profiles from the PDF file.

Default: True

Show all

Copy parameter's URL RemoveAlternateImages Remove alternate images
Optional

Bool Removes alternate images and leave only the one for on-screen viewing.

Default: True

Show all

Copy parameter's URL RemoveNamedDestinations Remove named destinations
Optional

Bool Remove named destinations from the PDF file.

Default: False

Show all

Copy parameter's URL RemoveEmbeddedFiles Remove embedded files
Optional

Bool Remove embedded/attachments files from the PDF file.

Default: True

Show all

Copy parameter's URL RemovePieceInformation Remove piece information
Optional

Bool Remove piece information dictionaries like Adobe Illustrator or Photoshop private data.

Default: True

Show all

Copy parameter's URL UnembedBaseFonts Unembed base fonts
Optional

Bool Specifies whether to remove the base fonts from the PDF file.

Default: False

Show all

Copy parameter's URL SubsetEmbeddedFonts Subset embedded fonts
Optional

Bool Include in the output PDF document only the font characters that are used in the original document.

Default: True

Show all

Copy parameter's URL CreateObjectStreams Create object streams
Optional

Bool Create object streams when compressing 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.

Default: True

Show all

Copy parameter's URL Optimize Optimize content
Optional

Bool Optimize page content streams in the PDF file.

Default: True

Show all

Copy parameter's URL LzwToFlate Lzw to flate
Optional

Bool In streams that use LZW encoding, use Flate instead.

Default: True

Show all

Copy parameter's URL Linearize Linearize
Optional

Bool Linearize compressed PDF file and optimize for fast Web View.

Default: False

Show all

Copy parameter's URL PreservePdfa Preserve PDF/A
Optional

Bool Preserve the PDF/A standard when compressing the PDF file.

Default: True

Show all

Developer mode

Snippets are autogenerated according to converter parameter choices above. Please select file in "File" or "Files" parameter before using code snippets.

Code snippet is using ConvertAPI JavaScript Client

Code snippet is using ConvertAPI Node.js Client

Code snippet is using ConvertAPI PHP Client

Code snippet is using ConvertAPI Java Client

Code snippet is using ConvertAPI C# Client

Code snippet is using ConvertAPI Ruby Client

Code snippet is using ConvertAPI Python Client

Code snippet is using ConvertAPI Go Client

Code snippet is using command line utility program

For conversions with the multiple file result please refer to the example