Skip to main content

Merge

Merges multiple PDF documents into a single PDF file.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • PDF Paths - An array of file paths to the PDF documents that will be merged.

Options

  • Output Path - The path where the merged PDF will be saved.

Output

  • result - The result of the merge operation.

How It Works

The Merge node combines multiple PDF documents into a single PDF file in the order specified by the input paths. When executed, the node:

  1. Validates that all input PDF paths are not empty and exist
  2. Creates a PDFMergerUtility instance
  3. Sets the destination file path for the merged PDF
  4. Adds each source PDF to the merger in the order they appear in the input array
  5. Merges all documents into a single PDF file
  6. Saves the merged PDF to the specified output path

Requirements

  • Valid file paths to existing PDF documents
  • An output path where the merged PDF can be saved
  • Sufficient permissions to read all input files and write to the output location

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid PDF Paths
  • One or more PDF files do not exist
  • File I/O errors
  • PDF processing errors

Usage Notes

  • The order of PDFs in the input array determines their order in the merged document
  • All input PDFs must be valid and readable
  • The output path must be writable
  • Merging large PDFs may require significant memory resources
  • The merged PDF will contain all pages from all input documents in sequence