Sign PDF using n8n action
PDF4me Sign PDF adds digital signatures and signature images to PDF documents through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to insert signature images with precise positioning, customizable sizing, transparency control, rotation options, page-specific targeting, and flexible alignment for secure document authentication and verification. This solution is ideal for contract signing, legal documents, approval workflows, authentication processes, document verification, and automated signing workflows that require professional signature placement with accurate rendering and seamless integration.
Setup
Add the PDF4me "Sign PDF" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "Sign PDF" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Sign PDF action. Configure these parameters to control PDF signature addition.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | PDF Input Format Selection • Choose the format of your PDF data input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field | Binary | Binary PDF File Input (Required if Binary Data) • Reference PDF file from previous n8n node or file upload • PDF4me processes binary PDF files with automatic format detection • Required when Input Data Type is "Binary Data" | {{ $binary.data }} |
| Base64 Document Content | String | Base64 Encoded PDF Input (Required if Base64 String) • Provide PDF data as base64 encoded string • PDF4me automatically decodes and processes the PDF content • Required when Input Data Type is "Base64 String" | UEsDBBQABgAI... |
| File URL | String | Public PDF URL Input (Required if URL) • Provide a public/open permission URL to the PDF file • PDF4me downloads and processes the file from URL • Required when Input Data Type is "URL" | https://abc.com/sample.pdf |
| Signature Image Input Type*** | String | Signature Image Input Format Selection • Choose the format of your signature image input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Signature Image Binary Field | Binary | Binary Signature Image Input (Required if Binary Data) • Reference signature image file from previous n8n node or upload • PDF4me processes binary images with automatic format detection • Required when Signature Image Input Type is "Binary Data" | {{ $binary.data }} |
| Signature Image | Base64 | Base64 Encoded Signature Image (Required if Base64 String) • Map signature image using base64 encoded data • PDF4me supports JPG, PNG, GIF, BMP, TIFF with quality optimization • Required when Signature Image Input Type is "Base64 String" | /9j/4AAQSkZ... |
| Signature Image URL | String | Public Signature Image URL (Required if URL) • Provide a public/open permission URL to signature image file • PDF4me downloads and processes the image from URL • Required when Signature Image Input Type is "URL" | https://abc.com/signature.png |
| Image Name*** | String | Signature Image Filename • Specify the name of the signature image file • Must include proper extension (.png, .jpg, .gif, .bmp, .tiff) • PDF4me validates file format compliance | signature.png |
| Pages*** | String | Page Specification • Specify page indices as comma-separated values or ranges • Examples: "0, 1, 2-" or "1, 2, 3-7" • If not specified, processes all pages • Must be in string format | 0, 1, 2- or 1, 2, 3-7 |
| Horizontal Alignment*** | String | Horizontal Image Alignment • Horizontal alignment of signature image on page • Options: Left, Center, Right • PDF4me provides pixel-perfect positioning • Essential for professional authentication | Center |
| Vertical Alignment*** | String | Vertical Image Alignment • Vertical alignment of signature image on page • Options: Top, Middle, Bottom • PDF4me ensures consistent positioning • Essential for professional presentation | Bottom |
| Width in mm*** | String | Element Width in Millimeters • Specify width of signature element in millimeters • Accurate millimeter-based sizing for print-ready documents • Essential for professional standards compliance | 50 |
| Height in mm*** | String | Element Height in Millimeters • Specify height of signature element in millimeters • Accurate millimeter-based dimensioning • Essential for consistent authentication | 50 |
| Width In Px*** | String | Element Width in Pixels • Specify width of signature element in pixels • Pixel-perfect width control for digital sizing • Essential for screen optimization | 2 |
| Height In Px*** | String | Element Height in Pixels • Specify height of signature element in pixels • Pixel-perfect height control for digital positioning • Essential for web-based workflows | 2 |
| Horizontal Margin (Mm)*** | String | Horizontal Margin in Millimeters • Set horizontal margin in millimeters • Applied on both left and right sides • Precise millimeter-based positioning • Essential for print-ready output | 20 |
| Vertical Margin (Mm)*** | String | Vertical Margin in Millimeters • Set vertical margin in millimeters • Applied to top and bottom • Ensures consistent vertical spacing • Essential for professional appearance | 20 |
| Horizontal Margin (Px)*** | String | Horizontal Margin in Pixels • Specify horizontal margin in pixels • Applied on both left and right sides • Pixel-perfect positioning for digital workflows • Alternative to millimeter-based | 57 |
| Vertical Margin (Px)*** | String | Vertical Margin in Pixels • Specify vertical margin in pixels • Applied to top and bottom • Pixel-level precision for digital documents • Alternative to millimeter-based | 57 |
| Opacity*** | String | Signature Transparency Control • Transparency for signature image (0-100) • 0 = maximum transparency, 100 = maximum opacity • Creates watermark signatures and layered elements • Essential for professional visual impact | 100 |
| Show Only In Print*** | Boolean | Print Visibility Control • Display signature only when printing or exporting • true = print-only, false = screen visibility • Advanced visibility control • Useful for confidential stamps | false |
| Is Background*** | Boolean | Background Layer Control • Indicate if signature should be in background layer • true = background, false = foreground • Advanced layer management for watermarks • Creates professional visual hierarchy | false |
| Output File Name*** | String | Signed PDF Output Filename • Specify the name for the generated PDF file • Must include .pdf extension • PDF4me ensures unique naming and format validation | signed_document.pdf |
| Document Name*** | String | Source PDF Reference • Specify the name of the source PDF file • For reference and tracking purposes • Helps with processing tracking | document.pdf |
| Binary Data Output Name*** | String | Binary Data Output Mapping • Define the variable name for accessing generated PDF binary data • Used in subsequent workflow actions • Essential for workflow automation | data |
Advanced Options
The following parameters are available in the Advanced Options section and are optional:
| Parameter | Type | Description | Example |
|---|---|---|---|
| Custom Profiles | String | Custom Configuration Profiles • Set additional options using custom profiles • JSON-like format containing predefined parameters • Enables advanced signature settings • Optional for specialized requirements | { "signatureType": "digital", "certificationLevel": "high" } |
Supported Signature Image Formats
| Format | Description | File Extensions | Max Size | Use Cases |
|---|---|---|---|---|
| PNG | Portable Network Graphics with advanced transparency support and lossless compression | .png | 50MB | Digital signatures, transparent backgrounds, professional authentication |
| JPEG | Joint Photographic Experts Group with optimized compression for photographic content | .jpg, .jpeg | 50MB | Photographic signatures, detailed images, high-quality document authentication |
| GIF | Graphics Interchange Format with animation support and transparency | .gif | 50MB | Animated signatures, simple graphics, web-optimized authentication |
| BMP | Bitmap image format with uncompressed data and high quality | .bmp | 50MB | High-quality signatures, detailed graphics, professional document authentication |
| TIFF | Tagged Image File Format with lossless compression and high quality | .tiff, .tif | 50MB | Professional signatures, archival quality, enterprise document authentication |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| fileName | String | PDF4me generated PDF filename - The complete filename of the successfully generated PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | signed_document.pdf |
| fileSize | Number | PDF4me PDF file size in bytes - The exact size of the generated PDF file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation | 125430 |
| success | Boolean | PDF4me signature status indicator - Boolean flag indicating the success or failure of the signature addition process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflows | true |
| mimeType | String | PDF4me output MIME type - MIME type of the generated PDF file, always "application/pdf" for PDF documents. Useful for content type validation and proper file handling in web applications | application/pdf |
| pageCount | Number | PDF4me processed page count - Number of pages that were processed with signatures. Provides verification of successful page processing and helps track document enhancement progress | 5 |
| message | String | PDF4me signature status message - Human-readable status message providing details about the signature addition process result. Includes success confirmation or error details for troubleshooting | PDF signed successfully |
N8N Action Response
The PDF4me Sign PDF API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"success": true,
"message": "PDF signed successfully",
"fileName": "signed_document.pdf",
"mimeType": "application/pdf",
"fileSize": 125430,
"pageCount": 5
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | PDF signed successfully |
| fileName | signed_document.pdf |
| mimeType | application/pdf |
| fileSize | 125430 |
| pageCount | 5 |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB PDF signed successfully
fileName: AB signed_document.pdf
mimeType: AB application/pdf
fileSize: # 125430
pageCount: # 5
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual PDF file data and metadata:
data
─────────────────────────────
File Name: signed_document.pdf
File Extension: pdf
Mime Type: application/pdf
File Size: 122.5 KB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Legal and Contract Management
- Sign legal contracts, agreements, and official documents with digital signatures for legal validity, contract execution, and regulatory compliance
- Process legal documents, court filings, and official records by adding digital signatures for legal authentication, document integrity, and legal compliance
- Transform business contracts, employment agreements, and partnership documents by adding digital signatures for legal validity, contract execution, and business compliance
Business Process and Workflow Automation
- Sign business documents, invoices, and financial records with digital signatures for automated approval workflows, business process automation, and workflow integration
- Process purchase orders, approval documents, and business communications by adding digital signatures for automated business processes, approval workflows, and business automation
- Transform project documents, deliverables, and business reports by adding digital signatures for project approval, stakeholder sign-off, and business process management
Compliance and Regulatory Documentation
- Sign compliance documents, regulatory filings, and official records with digital signatures for regulatory compliance, audit trails, and official documentation
- Process quality control documents, inspection reports, and certification materials by adding digital signatures for quality management, compliance, and regulatory standards
- Transform official documents, permits, and regulatory filings by adding digital signatures for regulatory compliance, official documentation, and legal validity