Add Text Stamp to PDF in n8n
Add Text Stamp to PDF is an n8n node by PDF4me that overlays custom text (CONFIDENTIAL, DRAFT, APPROVED, or any custom string) onto PDF pages with precise alignment, font, color, opacity, and rotation control. Use it for confidentiality marking, approval stamps, draft labels, or automated document branding without manual editing.
What this node does
PDF4me: Add Text Stamp to PDF renders a text string onto every targeted page at a chosen horizontal and vertical position, with control over font size, font color, opacity, rotation angle, margins, and background/foreground layering. Accepts the source PDF via Binary Data, Base64 String, or URL. Ideal for confidentiality labels, draft markers, approval stamps, copyright notices, and diagonal watermark-style branding.
Authenticating Your API Request
Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate stamping requests securely.
Important Facts You Should Not Miss

PDF4me Add Text Stamp To PDF node parameters panel in n8n
What Parameters Does Add Text Stamp to PDF Need?
Required: Input Data Type, Output File Name, Text, Pages, Horizontal Alignment, and Vertical Alignment. Conditional fields (Input Binary Field, Base64 Document Content, File URL) appear only when their parent Input Data Type is chosen. Everything else, including Document Name, margins, opacity, font, rotation, background, async processing, and Binary Data Output Name, is optional with a working default.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Input Data Type | Required | Format of the source PDF input. Choose Binary Data (from a previous node), Base64 String, or URL. | Binary Data |
| Input Binary Field | Conditional | Name of the binary property on the incoming n8n item that holds the PDF. Required when Input Data Type is Binary Data. Defaults to data. | data |
| Base64 Document Content | Conditional | Base64-encoded PDF content. Required when Input Data Type is Base64 String. | JVBERi0xLjQK... |
| File URL | Conditional | Publicly reachable HTTPS URL to the source PDF. Required when Input Data Type is URL. | https://example.com/sample.pdf |
| Output File Name | Required | Filename for the stamped PDF output. Must include the .pdf extension. | document_with_text_stamp.pdf |
| Document Name | Optional | Reference label for the source PDF, used for tracking only, not sent to the stamping engine. | document.pdf |
| Text | Required | The text string to stamp onto the page, such as a confidentiality label, draft marker, or custom watermark text. | CONFIDENTIAL |
| Pages | Required | Pages to stamp. Accepts a single page, a range, a mixed list, or an open range. All pages if left as "all". | 1 or 2-5 or 1,3,7-10 |
| Horizontal Alignment | Required | Horizontal position of the stamp on the page: Left, Center, or Right. | Center |
| Vertical Alignment | Required | Vertical position of the stamp on the page: Top, Center, or Bottom. | Center |
| Horizontal Margin (Mm) | Optional | Horizontal margin in millimeters, applied from the aligned edge. Default 0. | 0 |
| Vertical Margin (Mm) | Optional | Vertical margin in millimeters, applied from the aligned edge. Default 0. | 0 |
| Opacity | Optional | Stamp transparency from 0 (invisible) to 100 (fully opaque). Default full opacity. | 50 |
| Font Size | Optional | Font size in points, typically between 8 and 72. | 24 |
| Font Color | Optional | Stamp text color as a hex code. | #FF0000 |
| Rotation | Optional | Rotation angle in degrees. 0 is horizontal, 45 is diagonal, 90 is vertical. | 45 |
| Background | Optional | Places the stamp behind existing page content when true, or on top (foreground) when false. Default false. | false |
| Async Processing | Optional | Processes large PDFs in the background when enabled, improving reliability for high-page-count documents. | false |
| Binary Data Output Name | Optional | Name of the binary property the output item exposes. Default is data. | data |
Advanced Options
{ "fontFamily": "Arial", "fontSize": 24, "fontColor": "#FF0000" }, layered on top of the individual fields above.Output Fields
A successful run returns one n8n item carrying JSON metadata and the stamped binary PDF.
| Field | Type | What it contains |
|---|---|---|
success | Boolean | True when the stamp was applied successfully. Use to route error-handling branches. |
fileName | String | Generated filename, matching Output File Name. |
mimeType | String | MIME type of the output, always application/pdf. |
fileSize | Number | Size of the stamped PDF in bytes. |
pageCount | Number | Number of pages processed with the text stamp. |
Binary (data) | Binary | The stamped PDF under Binary Data Output Name (default data). Pass into Write Binary File, Email, or any cloud-storage upload. |
How Do I Set Up Add Text Stamp to PDF in n8n?
- Add PDF4me to your n8n workflow and choose the Add Text Stamp To PDF action.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching source PDF field.
- Set Output File Name (must end in
.pdf) and optionally Document Name for tracking. - Enter Text (e.g.
CONFIDENTIAL), Pages to target, and Horizontal Alignment / Vertical Alignment. - Optionally tune Horizontal Margin, Vertical Margin, Opacity, Font Size, Font Color, Rotation, and Background.
- Enable Async Processing for large documents if needed. Execute the node and route the stamped PDF into the next step.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Add Text Stamp to PDF.
- A Google Drive trigger fires when a new file lands in an outgoing-documents folder.
- PDF4me Add Text Stamp To PDF runs with Text CONFIDENTIAL, Horizontal Alignment Center, Vertical Alignment Top, Font Color red.
- The stamped PDF is uploaded back to a Reviewed folder and emailed to the recipient.
- A Schedule Trigger generates a weekly report PDF via PDF4me Generate Document.
- PDF4me Add Text Stamp To PDF runs with Text DRAFT, Rotation 45, Opacity 30, Background true for a subtle diagonal watermark.
- The watermarked draft is posted to a Slack review channel before final approval.
- An approval webhook fires once a manager marks a document approved in an internal tool.
- PDF4me Add Text Stamp To PDF runs with Text APPROVED, Pages set to the signature page only, Vertical Alignment Bottom.
- The finalized PDF is archived to SharePoint with the approval date in the filename.
- A Loop Over Items node iterates a list of document URLs from a database export.
- PDF4me Add Text Stamp To PDF runs with Input Data Type URL, File URL set per item, Async Processing enabled for reliability.
- Each stamped output is written to cloud storage with the source record ID as filename.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Add Text Stamp To PDF |
| Input Data Type | Binary Data |
| Input Binary Field | data |
| Output File Name | document_with_text_stamp.pdf |
| Text | CONFIDENTIAL |
| Pages | 1 (or "all") |
| Horizontal Alignment | Center |
| Vertical Alignment | Center |
| Opacity | 50 (lower for subtle watermark) |
| Rotation | 0 (45 for diagonal watermark) |
| Credentials | PDF4me API credential |