Actions80
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Image Watermark To Image
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- Add Text Watermark To Image
- AI-Invoice Parser
- AI-Process Contract
- AI-Process HealthCard
- Classify Document
- Compress Image
- Compress PDF
- Convert HTML To PDF
- Convert Image Format
- Convert JSON To Excel
- Convert Markdown To PDF
- Convert PDF To Editable PDF Using OCR
- Convert PDF To Excel
- Convert PDF To PowerPoint
- Convert PDF To Word
- Convert To PDF
- Convert URL to PDF
- Convert VISIO
- Convert Word to PDF Form
- Create Images From PDF
- Create PDF/A
- Create Swiss QR Bill
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Split PDF By Barcode
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Extract Attachment From PDF
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Resources
- Extract Table From PDF
- Extract Text By Expression
- Extract Text From Word
- Fill PDF Form
- Find And Replace Text
- Flip Image
- Flatten PDF
- Generate Barcode
- Generate Document Single
- Generate Documents Multiple
- Get Document From Pdf4me
- Get Image Metadata
- Get PDF Metadata
- Split PDF By Swiss QR
- Get Tracking Changes In Word
- Image Extract Text
- Linearize PDF
- Merge Multiple PDFs
- Overlay PDFs
- Parse Document
- Protect PDF
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Remove EXIF Tags From Image
- Repair PDF Document
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Document
- Rotate Image
- Rotate Image By EXIF Data
- Rotate PDF Page
- Sign PDF
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
The node operation "Split PDF By Barcode" processes a PDF document to split it into multiple smaller PDFs based on the detection of barcodes within the pages. It scans the PDF for barcodes matching specified criteria and splits the document at those barcode locations according to user preferences.
This operation is useful in scenarios such as:
- Automatically separating scanned batch documents where each section is marked by a barcode.
- Processing invoices, forms, or reports that include barcode separators.
- Digitally organizing large PDFs into meaningful segments without manual intervention.
For example, a company scanning hundreds of delivery notes can use this node to split the combined PDF into individual delivery note files by detecting barcodes printed on separator pages.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | How the PDF data is provided: either as a Base64 encoded string, binary data from previous nodes, or a URL pointing to the PDF file. |
| Binary Property Name | The name of the binary property containing the PDF file when using binary data input type. |
| Base64 Content | The Base64 encoded content of the PDF file when using base64 input type. |
| PDF URL | The URL to the PDF file when using URL input type. |
| Barcode String | The barcode text string to search for within the PDF pages. |
| Barcode Filter | The filter type for matching the barcode string: options are "Starts With", "Ends With", "Contains", or "Exact Match". |
| Barcode Type | The type of barcode to detect: "Any", "Data Matrix", "QR Code", or "PDF417". |
| Split Barcode Page | Defines where to split relative to the page containing the barcode: "After" the barcode page, "Before" the barcode page, or "Remove" the barcode page itself. |
| Combine Pages With Same Consecutive Barcodes | Whether to combine consecutive pages that have the same barcode value into one output PDF segment. |
| PDF Render DPI | The resolution (DPI) used when rendering the PDF for barcode detection; options include 100, 150, 200, or 250 DPI. |
| File Naming | The naming convention for the output split files: either "Name As Per Order" (sequential numbering) or "Name As Per Page" (based on page numbers). |
| Output Binary Field Name | The name of the binary property where the resulting split PDF files will be stored. |
| Advanced Options | A collection for additional custom JSON profiles to adjust API call properties, allowing advanced customization of the splitting process. |
Output
The node outputs an array of JSON objects, each representing a split PDF segment. Each item contains a binary property holding the PDF data of the split part. The binary property name is configurable via the "Output Binary Field Name" property (default is "data").
The output structure per item includes:
json: Metadata about the split file (e.g., order or page info depending on naming).binary: Contains the actual PDF file data of the split segment.
No textual or other non-binary outputs are indicated for this operation.
Dependencies
- Requires access to an external PDF processing service capable of barcode detection and PDF manipulation.
- Needs an API key or authentication token configured in n8n credentials to authorize requests to the PDF processing API.
- Internet connectivity if using URL input or calling external APIs.
- Proper configuration of the node's credentials and possibly environment variables for API endpoint URLs.
Troubleshooting
Common Issues:
- Incorrect barcode string or filter settings may result in no splits detected.
- Providing invalid or inaccessible PDF URLs will cause failures in fetching the document.
- Using unsupported barcode types or low DPI settings might reduce barcode detection accuracy.
- Large PDFs or high DPI settings may increase processing time or memory usage.
Error Messages:
- Errors related to missing or invalid input data indicate misconfiguration of input properties.
- Authentication errors suggest issues with API credentials setup.
- Barcode not found errors mean the barcode string/filter combination did not match any barcode in the PDF.
Resolutions:
- Verify the barcode string and filter parameters carefully.
- Ensure the PDF file is accessible and correctly provided.
- Adjust DPI settings for better barcode recognition.
- Check and update API credentials in n8n settings.
Links and References
- PDF4me API Documentation — For details on custom profiles and advanced options.
- Barcode Types Reference: Data Matrix, QR Code, PDF417 standards for understanding barcode formats.
- n8n Documentation on Binary Data Handling: https://docs.n8n.io/nodes/creating-nodes/binary-data/