1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

files → Add Watermark to PDF

AI-generated

Overview

This node adds a watermark image to a PDF file. It is useful in scenarios where you need to brand, secure, or annotate PDF documents with a custom image overlay (such as a company logo, confidential stamp, or any other graphic). Typical use cases include automating the addition of watermarks to invoices, reports, contracts, or any document that requires visual marking before distribution.

Practical examples:

  • Automatically watermarking all outgoing PDF invoices with your company logo.
  • Adding a "DRAFT" or "CONFIDENTIAL" stamp to internal documents.
  • Branding marketing materials before sharing with clients.

Properties

Name Meaning
Pdf file PDF file to add watermark to. This is the source PDF document that will receive the watermark.
Watermark Image Image to use as watermark. The image file that will be overlaid on each page of the PDF.
Watermark Size Size of the watermark relative to the individual page width. Image ratio is preserved. Defaults to 0.15. Accepts values between 0.00000001 and 1.
Position Position of the watermark. Options: C (Center), CE (Center East), CW (Center West), NC (North Center), NE (North East), NW (North West), SC (South Center), SE (South East), SW (South West). Defaults to SE.
Margin (X) Margin in pixels for the X axis. The x=0 coordinate is at the bottom left. Negative values move the image to the left. Defaults to -20.
Margin (Y) Margin in pixels for the Y axis. The y=0 coordinate is at the bottom left. Negative values move the image down. Defaults to 20.
Opacity Opacity of your image. Value between 0 (fully transparent) and 1 (fully opaque). Defaults to 1.
Binary Property Name of the binary property to which to write the data of the resulting PDF file. Defaults to data.

Output

  • Binary Data:
    The output is a binary file containing the new PDF with the watermark applied. The binary property name is configurable via the "Binary Property" input (default: data).

    • The output item will have its binary field populated with the processed PDF.
    • Any existing binary properties from the input are preserved unless overwritten by the output.
  • JSON Field:
    The JSON part of the output will remain unchanged from the input, unless an error occurs, in which case it will contain an error field with details about the failure.

Dependencies

  • External Service:
    Requires access to the 1001fx API.
  • API Key:
    You must configure n8n with valid credentials for the 1001fxApi.
  • n8n Configuration:
    No additional environment variables required beyond standard credential setup.

Troubleshooting

  • Common Issues:

    • Missing or Invalid Files: If either the PDF or watermark image is missing or not provided in the correct format, the node will fail.
    • Invalid Parameter Values: Supplying out-of-range values for size, opacity, or margins may result in errors or unexpected output.
    • API Errors: Network issues or invalid API credentials can cause failures.
  • Error Messages:

    • "error": "File not found" – Ensure both the PDF and watermark image are correctly attached as binary inputs.
    • "error": "Invalid parameter" – Check that all numeric parameters are within their allowed ranges.
    • "error": "Authentication failed" – Verify your 1001fx API credentials in n8n.

Links and References

Discussion