Skip to main content

Split

Splits a PDF document into multiple PDF files, one for each page or groups of pages.

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 File Path - The path to the PDF file that will be split.

Options

  • Output Directory - The directory where the split PDF files will be saved.
  • Password - The password for the PDF document if it is encrypted.
  • Prefix - A prefix to add to the filenames of the generated PDFs.
  • Start Page - The page number to start splitting from (1-based index). If 0, starts from the first page.
  • End Page - The page number to stop splitting at (1-based index). If 0, processes all pages.
  • Per Page - The number of pages per split document. If 0, each page is saved as a separate document.

Output

  • result - The result of the PDF splitting operation.

How It Works

The Split node divides a PDF document into multiple smaller PDF files. When executed, the node:

  1. Validates that the input PDF path is not empty
  2. Checks that the output directory exists
  3. Loads the PDF document (using the password if provided)
  4. Splits the document according to the specified start and end pages
  5. Groups pages according to the "Per Page" setting
  6. Saves each group of pages as a separate PDF file in the output directory
  7. Closes all document resources

Requirements

  • A valid PDF file path
  • An existing output directory
  • Sufficient permissions to read the input file and write to the output location

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid PDF File Path
  • Output directory does not exist
  • File I/O errors
  • PDF processing errors

Usage Notes

  • Pages are numbered starting from 1
  • If Start Page is 0, splitting begins from the first page
  • If End Page is 0, all pages from the Start Page are processed
  • If Per Page is 0, each page is saved as a separate PDF file
  • If Per Page is greater than 0, that many pages are grouped together in each output file
  • The prefix is added before the page number in the filename