Add Text Stamp to PDF using n8n action
PDF4me Add Text Stamp to PDF adds custom text stamps and watermarks to PDF documents through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to insert text stamps (CONFIDENTIAL, DRAFT, APPROVED, custom text) with precise positioning, font customization, size control, color options, rotation angles, transparency settings, and page-specific targeting. This solution is ideal for document security, confidential marking, draft labeling, approval stamps, copyright notices, and automated document branding workflows that require professional text stamps with flexible formatting and seamless integration.
Setup
Add the PDF4me "Add Text Stamp to 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 "Add Text Stamp to PDF" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Add Text Stamp to PDF action. Configure these parameters to control text stamp 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 |
| Text*** | String | Text Stamp Content • Enter the text content to be stamped on the PDF • Supports any text string (confidential labels, watermarks, company names) • PDF4me processes text with advanced typography • Essential for professional presentation | CONFIDENTIAL |
| Pages*** | String | Page Specification • Define which pages should have the text stamp • Supports: single pages (1), ranges (2-5), mixed (1,3,7-10), open (2-) • If not specified, processes all pages • Examples: "1" or "2-5" or "1,3,7-10" or "2-" | 1 or 2-5 |
| Horizontal Alignment*** | String | Horizontal Text Alignment • Choose horizontal positioning on the page • Options: Left, Center, Right • PDF4me ensures precise horizontal alignment • Essential for professional presentation | Center |
| Vertical Alignment*** | String | Vertical Text Alignment • Choose vertical positioning on the page • Options: Top, Center, Bottom • PDF4me provides pixel-perfect vertical positioning • Essential for consistent branding | Center |
| Horizontal Margin (Mm)*** | Number | 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 | 0 |
| Vertical Margin (Mm)*** | Number | Vertical Margin in Millimeters • Set vertical margin in millimeters • Applied above and below text stamp • Ensures consistent vertical spacing • Essential for professional appearance | 0 |
| Opacity*** | Number | Text Stamp Transparency Control • Set opacity level from 0 to 100 • 0 = entirely transparent, 100 = full opacity • Creates watermark effects and layered elements • Essential for professional visual impact | 50 |
| Font Size*** | Number | Text Stamp Font Size • Set the font size in points for text stamp • PDF4me provides precise typography control • Optimal readability across different page sizes • Essential for professional presentation | 24 |
| Font Color*** | String | Text Stamp Color • Set color using hexadecimal color codes • Supports full color palette (hex colors) • Examples: #FF0000 (red), #000000 (black), #FFFFFF (white) • Essential for document branding | #FF0000 |
| Rotation*** | Number | Text Stamp Rotation • Set the rotation angle in degrees (0-360) • Precise angular control for diagonal watermarks • Creates tilted stamps and dynamic positioning • Useful for watermark effects | 45 |
| Background*** | Boolean | Background Layer Control • Indicate whether stamp should be in background (true) or foreground (false) • Advanced layer management for watermarks • Creates professional visual hierarchy • Essential for stamp positioning | true |
| Async Processing*** | Boolean | Asynchronous Processing Control • Enable asynchronous processing for large documents • PDF4me provides background processing capabilities • Improved performance and scalability • Useful for batch operations | false |
| Output File Name*** | String | Enhanced PDF Output Filename • Specify the name for the generated PDF file • Must include .pdf extension • PDF4me ensures unique naming and format validation | document_with_text_stamp.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 text stamping settings • Optional for specialized requirements | { "fontFamily": "Arial", "fontSize": 24, "fontColor": "#FF0000" } |
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 | document_with_text_stamp.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 text stamp status indicator - Boolean flag indicating the success or failure of the text stamp 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 text stamps. Provides verification of successful page processing and helps track document enhancement progress | 5 |
| message | String | PDF4me text stamp status message - Human-readable status message providing details about the text stamp addition process result. Includes success confirmation or error details for troubleshooting | Text stamp added to PDF successfully |
N8N Action Response
The PDF4me Add Text Stamp to 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": "Text stamp added to PDF successfully",
"fileName": "document_with_text_stamp.pdf",
"mimeType": "application/pdf",
"fileSize": 125430,
"pageCount": 5
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | Text stamp added to PDF successfully |
| fileName | document_with_text_stamp.pdf |
| mimeType | application/pdf |
| fileSize | 125430 |
| pageCount | 5 |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB Text stamp added to PDF successfully
fileName: AB document_with_text_stamp.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: document_with_text_stamp.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 Classification and Status Management
- Add text stamps with document status, classification levels, and processing indicators to PDF documents for workflow management and document organization
- Process business documents, reports, and official records by adding text stamps to indicate approval status, confidentiality levels, and processing stages
- Transform project documents, deliverables, and reports by adding text stamps for project tracking, version control, and stakeholder communication
Legal and Compliance Documentation
- Add text stamps with legal notices, compliance statements, and regulatory information to PDF documents for legal compliance and regulatory requirements
- Process contracts, agreements, and legal documents by adding text stamps to indicate legal status, execution dates, and compliance requirements
- Transform official documents, certificates, and permits by adding text stamps for legal validity, regulatory compliance, and official documentation
Business Process and Quality Control
- Add text stamps with quality control marks, inspection results, and process indicators to PDF documents for quality management and process control
- Process manufacturing documents, inspection reports, and quality records by adding text stamps to indicate quality status, inspection results, and compliance
- Transform business processes, workflows, and procedures by adding text stamps for process documentation, quality assurance, and continuous improvement