This operation allows you to compress/reduce the size of your PDF files while maintaining the quality.
Name | Description | Required |
---|---|---|
PDF URL | Provide the URL to the source PDF document, or a filetoken:// link from PDF.co Built-In Files Storage. If you use another cloud service such as Google Drive or Dropbox ensure the link is publicly accessible. | Yes |
File Name | File name for the generated output, the input must be in string format. | No |
Webhook URL | The callback URL or Webhook used to receive the output data. | No |
Password | The password of the password-protected PDF file | No |
HTTP Username | HTTP auth user name if required to access source URL. | No |
HTTP Password | HTTP auth password if required to access source URL. | No |
Custom Compression Configuration | Configuration options. By default this object is pre-defined to give typical options for optimization. | No |
config
object defines granular settings for the compression process. By default, this config
object is set to match the standard configuration for image optimization by Adobe Acrobat Pro and is defined as follows:
Name | Description |
---|---|
jobId | Unique identifier for the background job. |
pageCount | Number of pages in the PDF document. |
error | Indicates whether an error occurred (false means success) |
status | Status code of the request (200, 404, 500, etc.). For more information, see Response Codes. |
credits | Number of credits consumed by the request |
remainingCredits | Number of credits remaining in the account |
duration | Time taken for the operation in milliseconds |
url | Direct URL to the final PDF file stored in S3. |
name | Name of the output file |
outputLinkValidTill | Timestamp indicating when the output link will expire |