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 provides functionality to merge multiple PDF files into a single PDF document. It supports different input methods for the source PDFs, including binary data from previous nodes, base64 encoded strings, or URLs pointing to PDF files. This node is useful in scenarios where users need to combine several PDF documents—such as reports, invoices, contracts, or scanned pages—into one consolidated file for easier sharing, archiving, or further processing.

Practical examples:

  • Combining multiple invoice PDFs generated separately into a single monthly statement.
  • Merging contract pages received from different sources into one unified agreement.
  • Aggregating scanned documents fetched via URLs into a single PDF for review.

Properties

Name Meaning
Input Data Type Choose how to provide the PDF data:
- Base64 String (provide PDF content as base64 encoded string)
- Binary Data (use PDF files from previous nodes)
- URL (provide URLs to PDF files)
PDF Files Add multiple PDF files to merge when using Binary Data input type. Specify the binary property name containing the PDF and optionally a file name for reference.
PDF Files (Base64) Add multiple PDF files to merge when using Base64 String input type. Provide base64 encoded PDF content and optionally a file name for reference.
PDF Files (URL) Add multiple PDF files to merge when using URL input type. Provide URLs to the PDF files and optionally a file name for reference.
Output File Name Name for the output merged PDF file. Default is "merged_output.pdf".
Document Name Name of the output document for internal reference. Default is "merged_output".
Advanced Options Custom JSON profiles to adjust extra options for the API call, e.g., setting output data format or other advanced PDF processing parameters.

Output

The node outputs a single merged PDF document. The output contains a JSON field with metadata and references about the merged PDF, and a binary field containing the actual merged PDF file data. The binary data can be used downstream in workflows for saving, sending, or further processing the merged PDF.

Dependencies

  • Requires access to an external PDF processing API service that performs the merging operation.
  • Needs proper API authentication credentials configured in n8n to authorize requests to the PDF service.
  • Network access to fetch PDFs if URLs are provided as input.

Troubleshooting

  • Common issues:

    • Invalid or inaccessible URLs when using URL input type may cause failures fetching source PDFs.
    • Incorrect binary property names may result in missing or invalid PDF data.
    • Malformed base64 strings will cause decoding errors.
    • API authentication failures due to missing or incorrect credentials.
    • Large PDF files or too many files might lead to timeouts or memory issues.
  • Error messages and resolutions:

    • "Failed to fetch PDF from URL" — Check URL validity and network connectivity.
    • "Invalid binary property name" — Verify the binary property name matches the actual input data.
    • "Base64 decoding error" — Ensure the base64 string is correctly formatted without extra characters.
    • "Authentication failed" — Confirm API key or token is correctly set up in n8n credentials.
    • "API request timeout" — Try reducing the number or size of PDFs merged at once.

Links and References

Discussion