Overlay PDFs using n8n action
PDF4me Overlay PDFs merges two PDF documents by overlaying one on top of another through n8n automation workflows. Process base and layer PDFs via n8n triggers, binary data, base64 strings, or public URLs to combine documents with page-specific overlay targeting, transparency support, preserved formatting, and layered content composition. This solution is ideal for watermark application, background addition, letterhead merging, stamp overlays, form overlays, and automated PDF layering workflows that require precise document combination with professional layer composition and seamless integration.
Setup
Add the PDF4me "Overlay PDFs" 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 "Overlay PDFs" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Merge two PDF files one over another as Overlay action. Configure these parameters to control PDF overlay merging.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Base PDF Input Type*** | String | Base PDF Input Format • Choose the format for the base PDF file (background layer) • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Base PDF Binary Field | String | Base PDF Binary Data Reference (Required if Binary Data) • Specify the property name for accessing base PDF binary data • Should match the binary data property name in your workflow • Required when Base PDF Input Type is "Binary Data" | data |
| Base PDF Base64 Content | String | Base PDF Base64 Encoded Input (Required if Base64 String) • Provide base PDF data as base64 encoded string • PDF4me automatically decodes and processes the PDF content • Required when Base PDF Input Type is "Base64 String" | UEsDBBQABgAI... |
| Base PDF File URL | String | Base PDF Public URL Input (Required if URL) • Provide a public/open permission URL to the base PDF file • PDF4me downloads and processes the file from the provided URL • Required when Base PDF Input Type is "URL" | https://abc.com/base.pdf |
| Layer PDF Input Type*** | String | Layer PDF Input Format • Choose the format for the layer PDF file (overlay layer) • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Layer PDF Binary Field | String | Layer PDF Binary Data Reference (Required if Binary Data) • Specify the property name for accessing layer PDF binary data • Should match the binary data property name in your workflow • Required when Layer PDF Input Type is "Binary Data" | data |
| Layer PDF Base64 Content | String | Layer PDF Base64 Encoded Input (Required if Base64 String) • Provide layer PDF data as base64 encoded string • PDF4me automatically decodes and processes the PDF content • Required when Layer PDF Input Type is "Base64 String" | UEsDBBQABgAI... |
| Layer PDF File URL | String | Layer PDF Public URL Input (Required if URL) • Provide a public/open permission URL to the layer PDF file • PDF4me downloads and processes the file from the provided URL • Required when Layer PDF Input Type is "URL" | https://abc.com/layer.pdf |
| Output File Name*** | String | Overlaid PDF Output Filename • Specify the name for the generated overlaid PDF file • Must include .pdf extension • PDF4me ensures unique naming and format validation | overlayed_output.pdf |
| Binary Data Output Name*** | String | Binary Data Mapping • Define the variable name for accessing generated overlaid PDF data • Used in subsequent workflow actions • Essential for workflow data flow | 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 • Supports outputDataFormat, preserveMetadata, etc. • Optional for specialized requirements | { "outputDataFormat": "base64", "preserveMetadata": true, "optimizeForPrinting": false, "compressionLevel": "medium" } |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | PDF4me overlay operation status indicator - Boolean flag indicating the success or failure of the PDF overlay process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflows | true |
| message | String | PDF4me overlay operation status message - Human-readable status message providing details about the overlay process result. Includes success confirmation or error details for troubleshooting | PDFs overlaid successfully |
| fileName | String | PDF4me generated overlaid PDF filename - The complete filename of the successfully generated overlaid PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | overlayed_output.pdf |
| 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 |
| fileSize | Number | PDF4me overlaid PDF file size in bytes - The exact size of the generated overlaid 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 |
| docName | String | PDF4me document name reference - The name of the processed overlaid document for reference and tracking purposes. This matches the fileName for consistency in document management workflows | overlayed_output.pdf |
| overlayCompleted | Boolean | PDF4me overlay completion confirmation - Boolean flag confirming that the PDF overlay operation has been successfully completed. Useful for verifying that the overlay was applied correctly | true |
| layersProcessed | Number | PDF4me layers processed count - The number of PDF layers that were successfully processed and overlaid in the final document. Useful for tracking overlay completeness and document enhancement verification | 2 |
N8N Action Response
The PDF4me Overlay PDFs 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": "PDFs overlaid successfully",
"fileName": "overlayed_output.pdf",
"mimeType": "application/pdf",
"fileSize": 125430,
"docName": "overlayed_output.pdf",
"overlayCompleted": true,
"layersProcessed": 2
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | PDFs overlaid successfully |
| fileName | overlayed_output.pdf |
| mimeType | application/pdf |
| fileSize | 125430 |
| docName | overlayed_output.pdf |
| overlayCompleted | true |
| layersProcessed | 2 |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB PDFs overlaid successfully
fileName: AB overlayed_output.pdf
mimeType: AB application/pdf
fileSize: # 125430
docName: AB overlayed_output.pdf
overlayCompleted: ☑ true
layersProcessed: # 2
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual overlaid PDF file data and metadata:
data
─────────────────────────────
File Name: overlayed_output.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
Document Enhancement and Branding
- Overlay company logos, watermarks, or branding elements onto existing PDF documents
- Add headers, footers, or decorative elements to enhance document appearance
- Apply consistent visual branding across multiple documents by overlaying standard templates
Form and Template Integration
- Overlay form fields or interactive elements onto existing PDF documents
- Add signature blocks, approval sections, or other form components to documents
- Integrate standardized templates with dynamic content for consistent document formatting
Document Annotation and Markup
- Overlay annotations, comments, or markup layers onto PDF documents for review processes
- Add revision marks, change tracking, or approval stamps to documents
- Create layered documents with different levels of information or access permissions