0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

PDF → Merge PDF Files

AI-generated

Overview

The "Merge PDF Files" operation in the PDF resource of this node allows users to combine multiple PDF files into a single merged PDF document. This is useful when you have several separate PDF documents that you want to consolidate for easier sharing, archiving, or processing.

Common scenarios include:

  • Combining multiple reports or invoices into one file.
  • Merging scanned pages or forms collected separately.
  • Creating a single document from various chapters or sections stored as individual PDFs.

For example, a user might input three PDF files representing different parts of a contract and merge them into one complete contract PDF.

Properties

Name Meaning
PDF Files to Merge A collection of PDF files to be merged. For each file, you can specify:
- File URL or raw binary data (as string)
- Optional page ranges to include from that PDF (start and end page numbers, 1-based). Multiple page ranges per file can be specified.
Return as URL Boolean option to decide whether the merged PDF should be returned as a downloadable URL (true) or as raw binary data (false).
File Name Optional name for the resulting merged PDF file.

Output

The output contains a JSON field with the merged PDF data. Depending on the "Return as URL" property:

  • If Return as URL is true, the output will include a URL where the merged PDF can be downloaded.
  • If Return as URL is false, the output will contain the raw binary data of the merged PDF file.

This allows flexibility depending on whether the user wants to immediately download the file or process it further within n8n.

Dependencies

  • Requires an API key credential for authentication with the external service at https://prod.0codekit.com.
  • The node sends a POST request to the /pdf/merge endpoint of this service with the provided files and options.
  • No additional environment variables are explicitly required beyond the API key credential.

Troubleshooting

  • Invalid PDF URLs or corrupted files: Ensure that the URLs provided for PDF files are accessible and point to valid PDF documents. Corrupted or unsupported files may cause the merge operation to fail.
  • Page range errors: Specifying invalid page ranges (e.g., start page greater than end page, or pages outside the actual document length) may result in errors or unexpected output.
  • Authentication errors: Make sure the API key credential is correctly configured and has the necessary permissions.
  • Large files or too many files: Merging very large PDFs or a high number of files might lead to timeouts or memory issues depending on the external service limits.

If errors occur, check the error messages returned by the external API for guidance, and verify all inputs conform to expected formats.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion