API V2

Compress PDF

Connector ID: Optimize

Reduction of file size is necessary at times, when there are limitations in the storage capacity of data or in transferring and sharing documents of huge size. Its recommended to use the Compress PDF feature of PDF4me with Microsoft Flow.

  • Method: POST
  • Endpoint: /api/v2/Optimize

Parameters

File ContentBase64, Required

Source PDF file content.

File NameString, Required

Source PDF file name with .pdf extension

Optimize ProfileEnum, Required

Select type of compression. The allowed values are

  • Max - Maximum Compression, small size, short download, fast display.
  • Web - Small size, short download, fast display.
  • Print - Correct fonts, right color scheme, suitable resolution. Compression suitable while printing documents. minor loss in image dpi
  • Default -
  • WebMax -
  • PrintMax -
  • PrintGray -
  • Compress -
  • CompressMax -

Output

File ContentBinary

File content of the compressed document

File NameString

File name of the compressed document

Header
Content-Type:application/json
Authorization: Please copy key from the link.

Payload

{
  "docContent": "Please put PDF base64 content",
  "docName": "output.pdf",
  "optimizeProfile": "Web"
}

PDF4me api samples

CSharp(C#)
Java
JavaScript
Python
Salesforce
n8n
Google Script
AWS Lambda