CraftMyPDF icon

CraftMyPDF

Create beautiful PDF documents with ease using our drag-and-drop template editor. Start from ready-made templates for invoices, certificates, receipts, contracts, and more.

Actions7

PDF → Add Watermark

AI-generated

Overview

This node operation adds a watermark to an existing PDF document. It is useful for scenarios where you want to protect or brand PDF files by overlaying text watermarks, such as marking documents as confidential or draft. For example, you can add a semi-transparent rotated watermark text like "Confidential" across all pages of a PDF fetched from a URL.

Use Case Examples

  1. Adding a watermark text 'Confidential' with 40 font size, 0.5 opacity, rotated 45 degrees, in gray color to a PDF document located at a specified URL.
  2. Customizing the watermark font family and color to match branding requirements.

Properties

Name Meaning
Region Specifies the API endpoint region to use for the request, such as default, Australia, Europe, or US East.
Expiration Expiration time in minutes for the generated PDF.
Output File The filename for the output PDF file.
URL The URL of the source PDF to which the watermark will be added.
Watermark Text The text content of the watermark to be added to the PDF.
Font Size The font size of the watermark text.
Opacity The opacity level of the watermark text, controlling its transparency.
Rotation The rotation angle of the watermark text in degrees.
Hex Color The color of the watermark text in hexadecimal format.
Font Family The font family used for the watermark text, such as Helvetica or Courier.

Output

JSON

  • url - URL of the watermarked PDF file returned by the API
  • text - Watermark text that was added to the PDF
  • font_size - Font size of the watermark text
  • opacity - Opacity level of the watermark text
  • rotation - Rotation angle of the watermark text
  • hex_color - Hexadecimal color code of the watermark text
  • font_family - Font family used for the watermark text
  • expiration - Expiration time in minutes for the generated PDF
  • output_file - Filename of the output PDF file

Dependencies

  • An API key credential for authentication with the CraftMyPDF API

Troubleshooting

  • Invalid JSON input for parameters that require JSON format will cause errors; ensure JSON is well-formed.
  • Network or endpoint errors may occur if the selected region endpoint is incorrect or unavailable; verify the region setting.
  • Errors related to missing or invalid API credentials will prevent the request from succeeding; ensure valid API key credentials are configured.
  • If the source PDF URL is invalid or inaccessible, the watermark operation will fail; verify the URL is correct and accessible.

Links

Discussion