PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

The node overlays one PDF document (the "layer" PDF) on top of another PDF document (the "base" PDF). This operation is useful when you want to combine two PDFs by placing the content of one over the other, for example, adding a watermark, stamp, or additional graphics from the layer PDF onto the base PDF. Practical scenarios include branding documents with company logos, adding signatures or stamps, or merging form templates with filled data.

Properties

Name Meaning
Base PDF Input Type How to provide the base PDF file. Options: Binary Data (from previous node), Base64 String (direct base64 content), URL (link to the PDF file).
Layer PDF Input Type How to provide the layer PDF file. Options: Binary Data (from previous node), Base64 String (direct base64 content), URL (link to the PDF file).
Base PDF Binary Field The name of the binary property containing the base PDF file (used if Base PDF Input Type is Binary Data).
Layer PDF Binary Field The name of the binary property containing the layer PDF file (used if Layer PDF Input Type is Binary Data).
Base PDF Base64 Content Base64 encoded content of the base PDF (used if Base PDF Input Type is Base64 String).
Layer PDF Base64 Content Base64 encoded content of the layer PDF (used if Layer PDF Input Type is Base64 String).
Base PDF URL URL to the base PDF file (used if Base PDF Input Type is URL).
Layer PDF URL URL to the layer PDF file (used if Layer PDF Input Type is URL).
Output File Name The desired filename for the resulting overlayed PDF file. Default is "overlayed_output.pdf".
Advanced Options Custom JSON profiles to adjust extra properties for the API call, allowing advanced customization of the overlay process.
Binary Data Output Name Custom name for the binary data field in the node's output. Default is "data".

Output

The node outputs the overlayed PDF as binary data under the specified binary data output name (default "data"). The output contains the combined PDF file where the layer PDF content is placed over the base PDF content. The output can be used downstream in workflows that require the merged PDF file.

Dependencies

  • Requires access to an external PDF processing API service capable of overlaying PDFs.
  • Needs proper API authentication configured in n8n (e.g., an API key credential).
  • Network access to URLs if input PDFs are provided via URL.
  • No internal credentials or service names are exposed; users must configure their own API credentials.

Troubleshooting

  • Common issues:
    • Incorrect binary property names may cause the node to fail to find the input PDF files.
    • Invalid or malformed base64 strings will result in errors during decoding.
    • Unreachable or invalid URLs will cause download failures.
    • Missing or incorrect API credentials will lead to authentication errors.
  • Error messages:
    • Errors related to missing input files usually indicate wrong binary property names or empty input data.
    • API errors might mention authentication failure or invalid request payloads; verify credentials and input formats.
  • Resolutions:
    • Double-check the binary property names match those from previous nodes.
    • Validate base64 strings before use.
    • Ensure URLs are accessible and point directly to PDF files.
    • Confirm API credentials are correctly set up in n8n.

Links and References

  • PDF4me API Documentation — For details on custom profiles and advanced options.
  • General PDF overlay concepts: Adding watermarks, stamps, or combining PDFs in document workflows.

Discussion