Overview
This node integrates with the Gotenberg API to perform PDF-related transformations. Specifically, the "Split PDF" operation allows users to split a single PDF file into multiple smaller files based on either equal page intervals or specific page numbers.
Common scenarios where this node is beneficial include:
- Breaking down large PDF documents into manageable chunks for easier distribution or processing.
- Extracting sections of a PDF by specifying exact pages to split at.
- Automating document workflows that require segmenting PDFs, such as splitting invoices, reports, or manuals.
For example, you can split a 100-page PDF into 10-page segments or split it at pages 5, 10, and 15 to create separate files accordingly.
Properties
| Name | Meaning |
|---|---|
| PDF File | The binary field name containing the PDF file to split. |
| Split Mode | How to split the PDF. Options: - By Intervals: Split into equal page intervals. - Specific Pages: Split at specific page numbers. |
| Interval Size | Number of pages per split file (used only if Split Mode is "By Intervals"). Must be ≥ 1. |
| Page Numbers | Comma-separated page numbers where to split (e.g., "5,10,15"). Used only if Split Mode is "Specific Pages". |
Output
The output contains the split PDF files packaged in a ZIP archive. The json output field preserves the original input JSON data for each item. The binary data field contains the ZIP file (split-pages.zip) with all resulting split PDF files inside.
json: Original input JSON data passed through unchanged.binary.data: A ZIP archive containing the split PDF files.
Dependencies
- Requires an active connection to the Gotenberg API service via an API key credential.
- The node expects the Gotenberg API base URL to be configured in the credentials.
- The input PDF must be provided as binary data in the specified field.
Troubleshooting
- No binary data found for field: This error occurs if the specified binary field for the PDF file does not exist or is empty in the input data. Ensure the correct binary field name is set and that the input contains valid PDF binary data.
- Invalid page numbers or interval size: Providing invalid or out-of-range page numbers or an interval size less than 1 may cause errors or unexpected results. Validate these inputs before running the node.
- API connectivity issues: If the node cannot reach the Gotenberg API, check network connectivity, API base URL configuration, and API key validity.
- ZIP output handling: Since the output is a ZIP archive, downstream nodes must be able to handle ZIP binary data appropriately.