API V2

Linearize PDF

Web Optimized PDFs are better displayed visually and useless data as only the required parts of the document are loaded. The idea behind linearization is a faster display of PDF documents from the web.

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

Parameters

File Contentbase64, Required

The content of the input file

File Namestring, Required

Source PDF file name with .pdf extension

Optimize ProfileString, Required

Select type of compression. The allowed values are

  • Max - Maximum Compression, small size, short download, fast display.
  • Web - For Web, small size, short download, fast display.
  • Print - For 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 linearized document

File NameString

The file name of the linearized 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