Actions114
- AI Actions
- AI Advanced OCR
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Enitity Detection
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate Javascript Code
- Generate Python Code
- Language Detection
- Mood Detection
- PDF OCR
- Picture Object Recognition
- Picture Text Recognition
- Redact Sensitive Information From PDF
- Too Long To Read
- Transcribe
- Translation
- 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
PDF → Watermark PDF
AI-generatedOverview
This node operation allows users to add watermarks to PDF files. It supports watermarking with either text or images, providing options to customize the watermark's appearance and positioning. Users can specify the PDF source via URL or buffer, select pages to watermark, and configure watermark properties such as rotation, opacity, spacing, font, color, size, and repeat behavior. This operation is useful for branding, copyright protection, or adding informational overlays to PDF documents.
Use Case Examples
- Adding a text watermark with custom font, size, and color to specific pages of a PDF.
- Applying an image watermark with specified width, height, and positioning on all pages of a PDF.
- Using a buffer input for the PDF and outputting the watermarked PDF as a URL for easy sharing.
Properties
| Name | Meaning |
|---|---|
| Code Variables | Variables defined in the code editor that can be used within the watermarking function, allowing dynamic watermark content. |
| Watermark PDF | Type of watermark to apply, either text or image. |
| URL | Public URL of the PDF file to be watermarked. |
| Buffer | Buffer of the PDF file to be watermarked. |
| Get File as URL | Whether to output the watermarked PDF as a URL. |
| Filename | Filename of the PDF file. |
| Rotation of the Image/Text | Counter-clockwise rotation angle in degrees for the watermark image or text. |
| Anchor of the Image | Positioning anchor of the watermark image relative to the page. |
| Align of the Image | Part of the watermark image that should align with the specified anchor position. |
| X-Offset | Horizontal offset in points relative to the anchor position. |
| Y-Offset | Vertical offset in points relative to the anchor position. |
| Pages | Pages of the PDF to apply the watermark to, specified as ranges or individual pages. |
| Text | Text content of the watermark (if watermark type is text). |
| Color | Font color of the text watermark as a six-digit hex code. |
| Size | Font size of the text watermark in points. |
| Font | Font type used for the text watermark. |
| Repeat Watermark | Whether to repeat the watermark across the page. |
| Opacity | Opacity level of the watermark text or image, between 0 and 1. |
| Spacing | Spacing between repeated watermark instances, applicable if repeat is true. |
| URL of the Image | Public URL of the image used as a watermark (if watermark type is image). |
| Imagebuffer of the Image | Base64-encoded buffer of the image used as a watermark. |
| Width of Image | Width of the watermark image. |
| Height of Image | Height of the watermark image. |
Output
JSON
watermarkedPdf- The resulting watermarked PDF file, either as a buffer or URL depending on the 'Get File as URL' setting.
Dependencies
- An API key credential for the CodeKit API service
Troubleshooting
- Ensure the PDF input is correctly provided either as a valid URL or buffer; invalid inputs may cause errors.
- If using image watermarks, verify the image URL or buffer is accessible and correctly formatted.
- Check that page ranges specified in 'Pages' are valid and correctly formatted to avoid processing errors.
- Opacity values should be between 0 and 1; values outside this range may be ignored or cause unexpected results.