Actions80
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Image Watermark To Image
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- Add Text Watermark To Image
- AI-Invoice Parser
- AI-Process Contract
- AI-Process HealthCard
- Classify Document
- Compress Image
- Compress PDF
- Convert HTML To PDF
- Convert Image Format
- Convert JSON To Excel
- Convert Markdown To PDF
- Convert PDF To Editable PDF Using OCR
- Convert PDF To Excel
- Convert PDF To PowerPoint
- Convert PDF To Word
- Convert To PDF
- Convert URL to PDF
- Convert VISIO
- Convert Word to PDF Form
- Create Images From PDF
- Create PDF/A
- Create Swiss QR Bill
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Split PDF By Barcode
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Extract Attachment From PDF
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Resources
- Extract Table From PDF
- Extract Text By Expression
- Extract Text From Word
- Fill PDF Form
- Find And Replace Text
- Flip Image
- Flatten PDF
- Generate Barcode
- Generate Document Single
- Generate Documents Multiple
- Get Document From Pdf4me
- Get Image Metadata
- Get PDF Metadata
- Split PDF By Swiss QR
- Get Tracking Changes In Word
- Image Extract Text
- Linearize PDF
- Merge Multiple PDFs
- Overlay PDFs
- Parse Document
- Protect PDF
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Remove EXIF Tags From Image
- Repair PDF Document
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Document
- Rotate Image
- Rotate Image By EXIF Data
- Rotate PDF Page
- Sign PDF
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
The node operation "Add Text Stamp To PDF" allows users to add a customizable text stamp onto PDF documents. This is useful for marking PDFs with labels such as "CONFIDENTIAL," "DRAFT," or any other custom text to indicate status, ownership, or other metadata directly on the document pages.
Common scenarios include:
- Adding watermarks or stamps to official documents before sharing.
- Marking drafts or confidential files automatically in workflows.
- Branding PDFs with company names or disclaimers.
Practical example: Automatically stamping all invoices generated in a workflow with the text "PAID" on the first page, centered horizontally and vertically, with semi-transparent red text rotated at 45 degrees.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | How the PDF file is provided: "Binary Data" (from previous node), "Base64 String" (direct base64 content), or "URL" (link to PDF file). |
| Input Binary Field | The name of the binary property containing the PDF file when using "Binary Data" input type. |
| Base64 PDF Content | Base64 encoded string of the PDF document content when using "Base64 String" input type. |
| PDF URL | URL pointing to the PDF file when using "URL" input type. |
| Output File Name | Desired filename for the output PDF with the text stamp applied. |
| Document Name | Reference name of the source PDF file. |
| Text | The actual text string to be stamped onto the PDF pages. |
| Pages | Page range where the text stamp should be applied (e.g., "1", "1-3", "all"). |
| Horizontal Alignment | Horizontal alignment of the text stamp on the page: Left, Center, or Right. |
| Vertical Alignment | Vertical alignment of the text stamp on the page: Top, Middle, or Bottom. |
| Horizontal Margin (Mm) | Horizontal margin in millimeters to offset the text stamp from the aligned edge. |
| Vertical Margin (Mm) | Vertical margin in millimeters to offset the text stamp from the aligned edge. |
| Opacity | Opacity level of the text stamp, from 0 (fully transparent) to 100 (fully opaque). Default is 50 (semi-transparent). |
| Font Size | Font size of the stamped text, ranging from 8 to 72 points. |
| Font Color | Hex color code specifying the font color of the text stamp (e.g., "#FF0000" for red). |
| Rotation | Rotation angle in degrees for the text stamp (e.g., 45 degrees). |
| Background | Boolean indicating if the text stamp should be placed in the background (true) or foreground (false). |
| Async Processing | Boolean to enable asynchronous processing, recommended for large files or many calls to reduce server load. |
| Advanced Options | Collection for additional custom JSON profiles to adjust extra API call properties. |
| Binary Data Output Name | Custom name for the binary data field in the node's output. Defaults to "data". |
Output
The node outputs the modified PDF document with the text stamp applied. The output includes:
- A JSON object containing metadata about the processed file.
- A binary data field containing the stamped PDF file content, named according to the "Binary Data Output Name" property (default "data").
If the input was binary or base64, the output will be a binary PDF file ready for further use or download. If the input was a URL, the output similarly contains the stamped PDF binary data.
Dependencies
- Requires access to an external PDF processing service API that supports adding text stamps to PDFs.
- Needs proper API authentication configured in n8n credentials (an API key or token).
- Network access to fetch PDFs by URL if the "URL" input type is used.
- Optional advanced configuration via JSON profiles for fine-tuning API behavior.
Troubleshooting
Common issues:
- Invalid or inaccessible PDF URL leading to fetch errors.
- Incorrect base64 content causing decoding failures.
- Unsupported page ranges or invalid page numbers.
- API authentication failures due to missing or incorrect credentials.
- Large files may cause timeouts if async processing is disabled.
Error messages and resolutions:
- "Failed to fetch PDF from URL": Check URL accessibility and network connectivity.
- "Invalid base64 content": Verify the base64 string is correctly encoded.
- "Page range out of bounds": Ensure specified pages exist in the PDF.
- "Authentication failed": Confirm API credentials are set up properly.
- Timeout or server errors: Enable async processing or split large files into smaller batches.
Links and References
- PDF4me API Documentation
- General info on PDF text stamping concepts: https://en.wikipedia.org/wiki/Watermark_(graphics)
- n8n documentation on working with binary data: https://docs.n8n.io/nodes/working-with-binary-data/