Split
Splits a PDF file into multiple separate PDF files based on specified page numbers, useful for breaking large documents into smaller parts.
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.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- PDF Path - Path to the PDF file to split.
- Directory to Save Pages - Directory path where split PDF files will be saved.
Options
- Page Number(s) to Split - Array of page numbers at which to split the PDF. Each entry creates a new split point.
- Custom Page Number(s) - Alternative method to provide page numbers as an integer array from message scope (e.g.,
[1, 5, 10]).
You can provide page numbers either through the Page Number(s) to Split fields or via Custom Page Number(s) from the message scope. If neither is provided, the default behavior is to split every page (span = 1).
Output
This node does not produce any output variables. Split PDF files are saved to the specified directory.
How It Works
The Split node divides a PDF file into multiple separate files. When executed, the node:
- Validates the PDF path and output directory
- Determines split points from provided page numbers
- If only one page number is provided: Splits the PDF into chunks of that size (span mode)
- If multiple page numbers are provided: Splits at each specified page number
- Generates separate PDF files for each section
- Saves all split files to the output directory with auto-generated filenames
Split Modes
Span Mode (Single Page Number)
When only one page number is provided (e.g., [3]), the PDF is split into chunks of that size:
- A 10-page PDF split with
[3]creates: pages 1-3, 4-6, 7-9, 10
Split Points Mode (Multiple Page Numbers)
When multiple page numbers are provided (e.g., [3, 7, 9]), the PDF is split at those exact pages:
- A 10-page PDF split with
[3, 7, 9]creates: pages 1-2, 3-6, 7-8, 9-10
Default Mode (No Page Numbers)
When no page numbers are provided, each page becomes a separate PDF file.
Use Cases
- Document Distribution: Split large reports into chapters for distribution
- Page Extraction: Extract specific page ranges from a document
- Batch Processing: Split documents for parallel processing workflows
- Archive Management: Break large archive files into manageable sizes
- Form Separation: Split multi-form PDFs into individual forms
- Email Attachments: Split large PDFs to meet email size limits
Example Split Operations
Split by Fixed Size
Input: 20-page PDF
Page Numbers: [5]
Result: 4 files (pages 1-5, 6-10, 11-15, 16-20)
Split at Specific Pages
Input: 15-page PDF
Page Numbers: [3, 8, 12]
Result: 4 files (pages 1-2, 3-7, 8-11, 12-15)
Split Every Page
Input: 5-page PDF
Page Numbers: [1] or leave empty
Result: 5 files (one per page)
Output File Naming
Split PDF files are automatically named by the PDF processor, typically including:
- Original filename prefix
- Page range or sequence number
.pdfextension
Example: document_page_1-3.pdf, document_page_4-6.pdf
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid PDF path
- PDF file not found at the specified path
- Empty or invalid output directory path
- Output directory does not exist or is not writable
- Invalid page number format
- Page numbers exceed the total page count of the PDF
- PDF file is encrypted or password-protected
- Insufficient permissions to read the PDF file or write to the output directory
Usage Notes
- The output directory must exist before running the node
- Original PDF file remains unchanged
- Page numbers are 1-indexed (first page is page 1)
- Split files preserve all content, formatting, and metadata from the original
- For encrypted PDFs, decrypt the file first using the Decrypt node
- Large PDFs may take longer to process
- Ensure sufficient disk space for all split files
Tips for Effective Use
- Create Output Directory First: Use File System nodes to ensure the directory exists
- Calculate Split Points: Use programming nodes to dynamically calculate page numbers
- Naming Convention: Rename split files immediately for better organization
- Verify Results: Check the output directory to ensure all expected files were created
- Array Input: Use Custom Page Number(s) when page numbers come from dynamic sources
- Sequential Processing: Process each split file in a loop for further operations
- Cleanup: Remove split files after processing to save disk space
Example Workflows
Split by Chapter
- Identify chapter start pages:
[1, 15, 30, 45] - Use Split node with these page numbers
- Rename each file with chapter names
- Distribute chapters separately
Extract Single Pages
- Use Split with
[1]to extract every page - Process each page individually
- Merge selected pages back together
Divide for Parallel Processing
- Split large PDF into equal chunks
- Process each chunk in parallel workflows
- Combine results at the end
Related Nodes
- Merge: Combine multiple PDFs back into one file
- Extract Images: Extract images from specific pages before splitting
- Decrypt: Decrypt password-protected PDFs before splitting