Compress PDF
POST https://api.pdfrest.com/compressed-pdf
Compress a PDF to reduce file size.
Required form-data body parameters:
- One of:
file
- File to be uploaded and processedid
- Alphanumeric ID (UUID) of existing file on server to be processed
compression_level
- Sets the degree of compression:- low - Helps preserve fidelity but with less reduction in file size
- medium - Attempts to balance fidelity with file size savings
- high - Maximizes file size savings at the cost of fidelity
- custom - Requires the
profile
parameter.
Optional form-data body parameters:
profile
- JSON profile to be uploaded with specifications for configurable compression settings (see this link for information on how to write a custom compression profile, or contact Support for help).
Request Body
[{"name"=>"file", "value"=>nil, "datatype"=>"null"}, {"name"=>"id", "value"=>"xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "datatype"=>"string"}, {"name"=>"compression_level", "value"=>"medium", "datatype"=>"string"}, {"name"=>"profile", "value"=>nil, "datatype"=>"null"}, {"name"=>"output", "value"=>"pdfrest_compressed_pdf", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Api-Key | string |