Add Margin to PDF
Add custom margin to PDF. You can add a margin to any side of the PDF. Please note that it will also change the page size of the PDF.
- Method: POST
- Endpoint: /api/v2/AddMargin
Parameters
- File NameString, Required
Map the name of the PDf file to add Margin with proper extension
- ContentBase64, Required
Map the PDF file content from the source action
- Top Marginint, RequiredDefault: 0
Specify the amount of space to be added at the top of the page, measured in millimeters (mm).
Example: 4
- Bottom Marginint, RequiredDefault: 0
Specify the amount of space to add at the bottom of the page, measured in millimeters (mm).
Example: 4
- Left Marginint, RequiredDefault: 0
Specify the amount of space to add on the left side of the page, measured in millimeters (mm).
Example: 2
- Right Marginint, RequiredDefault: 0
Specify the amount of space to add on the right side of the page, measured in millimeters (mm).
Example: 2
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",
"marginLeft": 2,
"marginRight": 2,
"marginTop": 4,
"marginBottom": 4
}
PDF4me api samples
- CSharp(C#)
- Java
- JavaScript
- Python
- Salesforce
- n8n
- Google Script
- AWS Lambda