Skip to main content

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:

  1. Add PDF4me node to workflow
  2. Select "Sign PDF" action
  3. Configure input parameters (see below)
Sign PDF

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.

ParameterTypeDescriptionExample
Input Data Type***StringPDF 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 FieldBinaryBinary 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 ContentStringBase64 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 URLStringPublic 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***StringSignature 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 FieldBinaryBinary 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 ImageBase64Base64 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 URLStringPublic 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***StringSignature 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***StringPage 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***StringHorizontal 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***StringVertical 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***StringElement 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***StringElement Height in Millimeters
• Specify height of signature element in millimeters
• Accurate millimeter-based dimensioning
• Essential for consistent authentication
50
Width In Px***StringElement 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***StringElement 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)***StringHorizontal 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)***StringVertical 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)***StringHorizontal 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)***StringVertical 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***StringSignature 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***BooleanPrint 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***BooleanBackground 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***StringSigned 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***StringSource 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***StringBinary 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:

ParameterTypeDescriptionExample
Custom ProfilesStringCustom 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

FormatDescriptionFile ExtensionsMax SizeUse Cases
PNGPortable Network Graphics with advanced transparency support and lossless compression.png50MBDigital signatures, transparent backgrounds, professional authentication
JPEGJoint Photographic Experts Group with optimized compression for photographic content.jpg, .jpeg50MBPhotographic signatures, detailed images, high-quality document authentication
GIFGraphics Interchange Format with animation support and transparency.gif50MBAnimated signatures, simple graphics, web-optimized authentication
BMPBitmap image format with uncompressed data and high quality.bmp50MBHigh-quality signatures, detailed graphics, professional document authentication
TIFFTagged Image File Format with lossless compression and high quality.tiff, .tif50MBProfessional signatures, archival quality, enterprise document authentication

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringPDF4me 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 processessigned_document.pdf
fileSizeNumberPDF4me 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 automation125430
successBooleanPDF4me 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 workflowstrue
mimeTypeStringPDF4me 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 applicationsapplication/pdf
pageCountNumberPDF4me processed page count - Number of pages that were processed with signatures. Provides verification of successful page processing and helps track document enhancement progress5
messageStringPDF4me signature status message - Human-readable status message providing details about the signature addition process result. Includes success confirmation or error details for troubleshootingPDF 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 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
}
]

Use Cases

  • 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

Get Help