Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
The "Watermark PDF" operation of the PDF resource in this node allows users to add watermarks to PDF documents. Users can choose between adding a text watermark or an image watermark on specified pages of a PDF file. This is useful for branding, copyright protection, or marking documents as confidential.
Typical use cases include:
- Adding a company logo or confidential stamp as a watermark on official PDF reports.
- Overlaying text such as "Draft", "Sample", or "Confidential" across one or more pages.
- Repeating the watermark multiple times across the page with control over opacity and spacing.
Properties
| Name | Meaning |
|---|---|
| Watermark PDF | Choose the type of watermark: Text or Image. |
| URL | Public URL of the source PDF file to be watermarked. |
| Buffer | Base64-encoded buffer of the PDF file to be watermarked (alternative to URL). |
| Get File as URL | Boolean indicating whether the output PDF should be returned as a public URL (true) or as raw data (false). |
| Filename | Desired filename for the output PDF. |
| Pages | Specifies which pages to apply the watermark to. Supports ranges like 1, 3-5, or relative pages like ^3-^1. |
| Anchor | Position on the page where the watermark image/text is anchored. Options: Bottom, Bottom Left, Bottom Right, Center, Left, Right, Top, Top Left, Top Right. |
| Align | Part of the watermark image/text that aligns with the anchor position. Same options as Anchor. |
| X-Offset | Horizontal offset in points from the anchor position. |
| Y-Offset | Vertical offset in points from the anchor position. |
| Rotation of Image/Text | Counter-clockwise rotation angle in degrees for the watermark. |
| Repeat Watermark | Boolean indicating if the watermark should be repeated across the page. |
| Spacing | Space in points between repeated watermark instances (only applies if Repeat is true). |
| Opacity | Opacity level of the watermark (text or image), value between 0 (transparent) and 1 (opaque). |
Text Watermark Specific Properties
| Name | Meaning |
|---|---|
| Text | The text string to use as the watermark. |
| Color | Font color specified as a six-digit hex code (e.g., FFFF00 for yellow). |
| Size | Font size in points. |
| Font | Font family to use. Options: Times Roman, Courier, Helvetica. |
Image Watermark Specific Properties
| Name | Meaning |
|---|---|
| URL of the Image | Public URL of the image to use as watermark. |
| Imagebuffer of the Image | Base64-encoded buffer of the image (alternative to URL). |
| Width of Image | Width in points of the watermark image. |
| Height of Image | Height in points of the watermark image. |
Output
The node outputs the watermarked PDF document. The output JSON contains the processed PDF either as a binary buffer or as a publicly accessible URL depending on the "Get File as URL" property.
json: Contains metadata or status information about the watermarking operation.- Binary data (if not using URL): The watermarked PDF file content encoded as a binary buffer suitable for further processing or saving.
Dependencies
- Requires access to the original PDF either via a public URL or as a base64-encoded buffer.
- If using image watermarks, the image must be accessible either by URL or provided as a base64 buffer.
- The node requires an API key credential for the underlying service that performs the watermarking operation.
- No additional environment variables are explicitly required beyond standard n8n credential setup.
Troubleshooting
- Invalid PDF input: Ensure the PDF URL is publicly accessible or the buffer is correctly base64 encoded.
- Image watermark issues: Verify the image URL or buffer is valid and accessible.
- Page range errors: Use correct page range syntax; invalid ranges may cause errors or no watermark applied.
- Opacity values out of range: Opacity must be between 0 and 1; values outside this range may be ignored or cause errors.
- Font or color issues in text watermark: Use supported fonts and valid hex color codes.
- API authentication errors: Confirm the API key credential is correctly configured and has necessary permissions.
Links and References
- n8n Expressions Documentation
- General PDF watermarking concepts: https://en.wikipedia.org/wiki/Watermark
- Hex color codes reference: https://www.color-hex.com/