Skip to main content

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:

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

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.

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
Text***StringText 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***StringPage 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***StringHorizontal Text Alignment
• Choose horizontal positioning on the page
• Options: Left, Center, Right
• PDF4me ensures precise horizontal alignment
• Essential for professional presentation
Center
Vertical Alignment***StringVertical 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)***NumberHorizontal 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)***NumberVertical Margin in Millimeters
• Set vertical margin in millimeters
• Applied above and below text stamp
• Ensures consistent vertical spacing
• Essential for professional appearance
0
Opacity***NumberText 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***NumberText 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***StringText 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***NumberText 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***BooleanBackground 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***BooleanAsynchronous 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***StringEnhanced 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***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 text stamping settings
• Optional for specialized requirements
{ "fontFamily": "Arial", "fontSize": 24, "fontColor": "#FF0000" }

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 processesdocument_with_text_stamp.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 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 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 text stamps. Provides verification of successful page processing and helps track document enhancement progress5
messageStringPDF4me text stamp status message - Human-readable status message providing details about the text stamp addition process result. Includes success confirmation or error details for troubleshootingText 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 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
}
]

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
  • 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

Get Help