Sign PDF
Add Signatures to your PDF. If you have an image of your signature, you can add it to your PDF document and control its position and size. Use the Sign PDF action in API to automate this process.
- Method: POST
- Endpoint: /api/v2/SignPdf
Parameters
- File ContentBase64, Required
Map the File Content of the file from the source action
- File NameString, Required
Specify the File Name of the PDF with proper file extension
- Sign ImageBase64, Required
Map the Signature image. Supported image types are jpg, png, gif, BMP, and tiff
- PagesString, Required
- Specify page indices as comma-separated values or ranges to process (e.g. “0, 1, 2-” or “1, 2, 3-7”).
- If not specified, the default configuration processes all pages. The input must be in string format.
- Horizontal Alignmentstring, Required
Horizontal alignment of the image. The allowed values are
- Left - left edge of the page
- Center - equal distance from the left and right edge of the page
- Right - right edge of the page
- Vertical alignmentstring, Required
Vertical alignment of the image. The allowed values are
- Top - the top edge of the page
- Middle - equal distance from the top and bottom edge of the page
- Bottom - the bottom edge of the page
- Width in mmstring, Required
Specify the width of the element in millimeters (mm).
Example: 50
- Height in mmstring, Required
Specify the height of the element in millimeters (mm).
Example: 50
- Height In PxString, Required
Specify the height of the element in pixels (px).
Example: 2
- Width In Pxstring, Required
Specify the width of the element in pixels (px).
Example: 2
- Margin X in mmString, Required
Set the horizontal margin (in millimeters) — the amount of space to be added on both the left and right sides of the element or content.
Example: 20
- Margin Y in mmString, Required
Set the vertical margin (in millimeters) — the amount of space added to the top and bottom of the element or page.
Example: 50
- Margin X in PxString, Required
Specify the horizontal margin (in pixels) — the amount of space to be added on both the left and right sides of the element.
Example: 5
- Margin Y in PxString, Required
Specify the vertical margin (in pixels) — the amount of space to be added to the top and bottom of the element.
Example: 5
- OpacityString, Required
Transparency for the sign image. Values range from 0 to 100. 0 for max transparency and 100 for max opacity.
Example - 100
- Show Only In PrintBoolean, Required
Display this element only when printing or exporting the document.
true
false
- Is BackgroundBoolean, Required
Indicates whether the element should be placed in the background layer, behind all other content.
true
false
Output
- File ContentBinary
File content of the compressed document
- File NameString
The file name of the Signed document
Header
Content-Type:application/json
Authorization: Please copy key from the link.
Payload
{
"alignX": "right",
"alignY": "bottom",
"docContent": "Please put PDF base64 content",
"docName": "output.pdf",
"imageName": "stamp.jpg",
"imageFile": "Please put image base64 content",
"pages": "1",
"marginXInMM": "20",
"marginYInMM": "50",
"marginXInPx": "5",
"marginYInPx": "5",
"opacity": "100",
"heightInMM": "50",
"heightInPx": "2",
"widthInPx": "2",
"widthInMM": "50",
"showOnlyInPrint": true,
"isBackground": true
}
PDF4me api samples
- CSharp(C#)
- Java
- JavaScript
- Python
- Salesforce
- n8n
- Google Script
- AWS Lambda