Skip to main content

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.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

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

Only 6 fields are truly required
The underlying PDF4me API requires just the PDF input, Output File Name, Text, Pages, Horizontal Alignment, and Vertical Alignment. Font, color, opacity, rotation, margins, background, and async processing all have working defaults.
Background controls stacking, not visibility
Background true renders the stamp behind existing page content (subtle watermark look); Background false (default) renders it on top, ideal for a visible confidentiality or approval mark.
Rotation plus opacity makes a classic diagonal watermark
Set Rotation to 45, lower Opacity to around 30-50, and enable Background for the traditional tilted, semi-transparent watermark look used on drafts and confidential copies.
Add Text Stamp to PDF n8n node configured with Action Add Text Stamp To PDF, Input Data Type Binary Data, Input Binary Field data, Output File Name document_with_text_stamp.pdf, Document Name document.pdf, Text CONFIDENTIAL, Pages 1, Horizontal Alignment Center, Vertical Alignment Center, Horizontal Margin and Vertical Margin 0

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.

ParameterRequiredWhat it doesExample
Input Data TypeRequiredFormat of the source PDF input. Choose Binary Data (from a previous node), Base64 String, or URL.Binary Data
Input Binary FieldConditionalName 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 ContentConditionalBase64-encoded PDF content. Required when Input Data Type is Base64 String.JVBERi0xLjQK...
File URLConditionalPublicly reachable HTTPS URL to the source PDF. Required when Input Data Type is URL.https://example.com/sample.pdf
Output File NameRequiredFilename for the stamped PDF output. Must include the .pdf extension.document_with_text_stamp.pdf
Document NameOptionalReference label for the source PDF, used for tracking only, not sent to the stamping engine.document.pdf
TextRequiredThe text string to stamp onto the page, such as a confidentiality label, draft marker, or custom watermark text.CONFIDENTIAL
PagesRequiredPages 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 AlignmentRequiredHorizontal position of the stamp on the page: Left, Center, or Right.Center
Vertical AlignmentRequiredVertical position of the stamp on the page: Top, Center, or Bottom.Center
Horizontal Margin (Mm)OptionalHorizontal margin in millimeters, applied from the aligned edge. Default 0.0
Vertical Margin (Mm)OptionalVertical margin in millimeters, applied from the aligned edge. Default 0.0
OpacityOptionalStamp transparency from 0 (invisible) to 100 (fully opaque). Default full opacity.50
Font SizeOptionalFont size in points, typically between 8 and 72.24
Font ColorOptionalStamp text color as a hex code.#FF0000
RotationOptionalRotation angle in degrees. 0 is horizontal, 45 is diagonal, 90 is vertical.45
BackgroundOptionalPlaces the stamp behind existing page content when true, or on top (foreground) when false. Default false.false
Async ProcessingOptionalProcesses large PDFs in the background when enabled, improving reliability for high-page-count documents.false
Binary Data Output NameOptionalName of the binary property the output item exposes. Default is data.data

Advanced Options

Custom Profiles (Optional)
A JSON-like block of predefined parameters for specialized stamping configurations, such as { "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.

FieldTypeWhat it contains
successBooleanTrue when the stamp was applied successfully. Use to route error-handling branches.
fileNameStringGenerated filename, matching Output File Name.
mimeTypeStringMIME type of the output, always application/pdf.
fileSizeNumberSize of the stamped PDF in bytes.
pageCountNumberNumber of pages processed with the text stamp.
Binary (data)BinaryThe 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?

  1. Add PDF4me to your n8n workflow and choose the Add Text Stamp To PDF action.
  2. In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
  3. Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching source PDF field.
  4. Set Output File Name (must end in .pdf) and optionally Document Name for tracking.
  5. Enter Text (e.g. CONFIDENTIAL), Pages to target, and Horizontal Alignment / Vertical Alignment.
  6. Optionally tune Horizontal Margin, Vertical Margin, Opacity, Font Size, Font Color, Rotation, and Background.
  7. 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.
CONFIDENTIAL stamp before external sharing
  1. A Google Drive trigger fires when a new file lands in an outgoing-documents folder.
  2. PDF4me Add Text Stamp To PDF runs with Text CONFIDENTIAL, Horizontal Alignment Center, Vertical Alignment Top, Font Color red.
  3. The stamped PDF is uploaded back to a Reviewed folder and emailed to the recipient.
Diagonal DRAFT watermark on generated reports
  1. A Schedule Trigger generates a weekly report PDF via PDF4me Generate Document.
  2. PDF4me Add Text Stamp To PDF runs with Text DRAFT, Rotation 45, Opacity 30, Background true for a subtle diagonal watermark.
  3. The watermarked draft is posted to a Slack review channel before final approval.
APPROVED stamp on a specific page after sign-off
  1. An approval webhook fires once a manager marks a document approved in an internal tool.
  2. PDF4me Add Text Stamp To PDF runs with Text APPROVED, Pages set to the signature page only, Vertical Alignment Bottom.
  3. The finalized PDF is archived to SharePoint with the approval date in the filename.
Batch stamping from a hosted PDF URL
  1. A Loop Over Items node iterates a list of document URLs from a database export.
  2. PDF4me Add Text Stamp To PDF runs with Input Data Type URL, File URL set per item, Async Processing enabled for reliability.
  3. Each stamped output is written to cloud storage with the source record ID as filename.

Practical Tips

Only 6 fields are required
Input, Output File Name, Text, Pages, Horizontal Alignment, and Vertical Alignment. Do not feel obligated to set every optional field.
Use Background true for subtle watermarks
Combine Background true with a lower Opacity (30-50) so the stamp does not obscure page content underneath.
Pages accepts open ranges
Use 2- to stamp from page 2 to the end, useful for skipping a cover page while stamping the rest.
Font Color must be a valid hex code
Values like #FF0000 work; unrecognized color names or malformed hex strings fail the request.
Enable Async Processing for large PDFs
Large or high-page-count documents benefit from asynchronous processing so the workflow execution does not time out.
Document Name is reference-only
It labels the source file for tracking; it does not affect stamping behavior or the output filename.

Cheat Sheet

FieldValue
ActionAdd Text Stamp To PDF
Input Data TypeBinary Data
Input Binary Fielddata
Output File Namedocument_with_text_stamp.pdf
TextCONFIDENTIAL
Pages1 (or "all")
Horizontal AlignmentCenter
Vertical AlignmentCenter
Opacity50 (lower for subtle watermark)
Rotation0 (45 for diagonal watermark)
CredentialsPDF4me API credential

Common Questions

Which fields are actually required for Add Text Stamp to PDF?+
Only six: the PDF input (via Input Data Type), Output File Name, Text, Pages, Horizontal Alignment, and Vertical Alignment. Font, color, opacity, rotation, margins, background, and async processing are all optional with sensible defaults. See Adobe's stamp-placement guidance for how alignment and margins interact on a page.
Can I stamp only some pages instead of the whole document?+
Yes. Pages accepts a single page (1), a range (2-5), a mixed list (1,3,7-10), or an open range (2-). Leaving it unset processes every page.
How do I create a diagonal watermark-style stamp?+
Set Rotation to a non-zero angle such as 45 for a classic diagonal watermark, combine with a lower Opacity value and Background set to true so the stamp sits behind the page content instead of on top of it.
What is the difference between Background true and false?+
Background true places the stamp behind existing page content, ideal for subtle watermarks. Background false (the default) places it in the foreground, on top of existing content, ideal for visible approval or confidentiality marks.
Can I stamp large PDFs asynchronously?+
Yes. Enable Async Processing for large documents so the node processes in the background instead of holding the workflow execution open, improving reliability for batch or high-page-count PDFs.
Does the stamp text support dynamic values?+
Yes, map an n8n expression into Text (for example a customer name or timestamp from an upstream node) since the field accepts any string, the same way n8n handles dynamic values across the platform per the n8n expressions documentation.

Same Task on Other Platforms

Get Help