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

This node operation merges multiple PDF files into a single PDF document. It is useful when you have several separate PDF documents that need to be combined into one cohesive file for easier sharing, archiving, or processing. For example, merging invoices, contracts, reports, or scanned documents into one consolidated PDF.

The node supports different ways to provide the input PDFs: as binary data from previous nodes, base64 encoded strings, or URLs pointing to the PDF files. After merging, it outputs the combined PDF as binary data, which can then be used in subsequent workflow steps such as saving to storage, sending via email, or further processing.

Properties

Name Meaning
PDF Files Collection of multiple PDF files to merge. Each file can be provided as:
- Binary Data (from previous nodes)
- Base64 encoded string
- URL to the PDF file.
Also allows specifying an optional file name for reference.
Output File Name The desired file name for the merged output PDF file (e.g., "merged_document.pdf").
Document Name A reference name for the output document (e.g., "merged-document").
Advanced Options Optional JSON string to specify custom profiles and additional settings for the merge operation. This allows advanced users to tweak API call properties according to external documentation.
Binary Data Output Name Custom name for the binary property in the node's output where the merged PDF binary data will be stored (default is "data").

Output

The node outputs the merged PDF file as binary data under the specified binary data output name (default "data"). The output JSON also includes metadata such as the document name and file name for reference. This binary data can be directly used by other nodes that accept binary inputs, such as file storage or email sending nodes.

Dependencies

  • Requires an active connection to the PDF processing service API.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The node relies on the external PDF4me API for merging functionality.
  • Users may optionally configure advanced options using JSON profiles as per the PDF4me API documentation.

Troubleshooting

  • Common issues:
    • Providing invalid or inaccessible URLs for PDF files will cause failures.
    • Incorrect base64 content format or corrupted binary data will result in errors.
    • Missing or invalid API authentication will prevent the merge operation.
  • Error messages:
    • Errors related to file retrieval usually indicate network or URL issues.
    • API errors about invalid input typically mean the PDF content was malformed.
    • Authentication errors require checking the configured API credentials.
  • Resolutions:
    • Verify all input PDF sources are accessible and correctly formatted.
    • Ensure the API key/token is valid and has necessary permissions.
    • Use the advanced options carefully; incorrect JSON syntax can cause failures.

Links and References

Discussion