Split PDF by Barcode using n8n action
PDF4me Split PDF by Barcode divides PDF documents based on detected barcode content through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to automatically detect barcodes (QR Code, Code 128, Data Matrix, etc.), split documents at barcode locations, and organize files using barcode content for intelligent file naming. This solution is ideal for mailroom automation, batch document processing, invoice separation, automated filing, document sorting, and barcode-based organization workflows that require accurate barcode detection with intelligent document splitting and seamless integration.
Setup
Add the PDF4me "Split PDF by Barcode" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "Split PDF by Barcode" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Split PDF by Barcode action. Configure these parameters to control barcode-based PDF splitting.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | PDF Input Format Selection • Choose the format of your PDF data input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Binary Property Name | String | Binary PDF File Input (Required if Binary Data) • Reference PDF file from previous n8n node or file upload • PDF4me processes binary PDF files with automatic format detection • Required when Input Data Type is "Binary Data" | data |
| Base64 Document Content | String | Base64 Encoded PDF Input (Required if Base64 String) • Provide PDF data as base64 encoded string • PDF4me automatically decodes and processes the PDF content • Required when Input Data Type is "Base64 String" | UEsDBBQABgAI... |
| File URL | String | Public PDF URL Input (Required if URL) • Provide a public/open permission URL to the PDF file • PDF4me downloads and processes the file from URL • Required when Input Data Type is "URL" | https://abc.com/sample.pdf |
| Barcode String*** | String | Barcode Search Value • Specify the barcode text or value to search for • Should match the barcode content that appears in the document • Used for identifying split points in the PDF | Test PDF Barcode |
| Barcode Filter*** | String | Barcode Matching Criteria • Choose how the barcode string should be matched • Options: Starts With, Contains, Exact Match, Ends With • PDF4me provides flexible barcode detection | Starts With |
| Barcode Type*** | String | Barcode Format Selection • Choose the type of barcode to detect in the PDF • Options: Any, Data Matrix, QR Code, PDF417 • PDF4me supports multiple barcode formats | Any |
| Split Barcode Page*** | String | Split Position Selection • Choose where to split the PDF relative to detected barcode • Options: After (split after the page), Before (split before the page) • PDF4me provides flexible split positioning | After |
| Combine Pages With Same Consecutive Barcodes | Boolean | Consecutive Barcode Handling • Enable combining pages with same consecutive barcode values • Helps group related content into single split file • Optional for advanced document organization | false |
| PDF Render DPI*** | String | Rendering Resolution • Choose the DPI (dots per inch) for PDF rendering during barcode detection • Options: 100 DPI (faster), 150 DPI (balanced), 200 DPI (better), 250 DPI (maximum accuracy) • Higher DPI provides better recognition but may increase processing time | 150 DPI |
| File Naming*** | String | Output File Naming Convention • Choose how generated split PDF files should be named • Options: Name As Per Order (sequential), Name As Per Page (with page numbers) • Helps organize output files | Name As Per Order |
| Output Binary Field Name*** | String | Binary Data Mapping • Define the variable name for accessing generated split PDF data • Used in subsequent workflow actions • Essential for workflow data flow | data |
Advanced Options
The following parameters are available in the Advanced Options section and are optional:
| Parameter | Type | Description | Example |
|---|---|---|---|
| Custom Profiles | String | Custom Configuration Profiles • Set additional options using custom profiles • JSON-like format containing predefined parameters • Supports outputDataFormat, preserveMetadata, etc. • Optional for specialized requirements | { "outputDataFormat": "base64", "preserveMetadata": true, "optimizeForPrinting": false, "compressionLevel": "medium" } |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | PDF4me barcode split operation status indicator - Boolean flag indicating the success or failure of the PDF barcode split process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflows | true |
| message | String | PDF4me barcode split operation status message - Human-readable status message providing details about the barcode split process result. Includes success confirmation or error details for troubleshooting | PDF split by barcode successfully |
| fileName | String | PDF4me generated split PDF filename - The complete filename of the successfully generated split PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | split_barcode_output.pdf |
| mimeType | String | PDF4me output MIME type - MIME type of the generated PDF file, always "application/pdf" for PDF documents. Useful for content type validation and proper file handling in web applications | application/pdf |
| fileSize | Number | PDF4me split PDF file size in bytes - The exact size of the generated split PDF file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation | 125430 |
| docName | String | PDF4me document name reference - The name of the processed split document for reference and tracking purposes. This matches the fileName for consistency in document management workflows | split_barcode_output.pdf |
| barcodeSplitCompleted | Boolean | PDF4me barcode split completion confirmation - Boolean flag confirming that the PDF barcode split operation has been successfully completed. Useful for verifying that the barcode-based split was applied correctly | true |
| barcodesDetected | Number | PDF4me barcodes detected count - The number of barcodes that were successfully detected and used as split points in the PDF document. Useful for tracking barcode detection effectiveness and split accuracy | 3 |
| filesGenerated | Number | PDF4me split files generated count - The number of individual PDF files that were successfully generated from the barcode split operation. Useful for tracking split completeness and document segmentation results | 4 |
N8N Action Response
The PDF4me Split PDF by Barcode API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"success": true,
"message": "PDF split by barcode successfully",
"fileName": "split_barcode_output.pdf",
"mimeType": "application/pdf",
"fileSize": 125430,
"docName": "split_barcode_output.pdf",
"barcodeSplitCompleted": true,
"barcodesDetected": 3,
"filesGenerated": 4
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | PDF split by barcode successfully |
| fileName | split_barcode_output.pdf |
| mimeType | application/pdf |
| fileSize | 125430 |
| docName | split_barcode_output.pdf |
| barcodeSplitCompleted | true |
| barcodesDetected | 3 |
| filesGenerated | 4 |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB PDF split by barcode successfully
fileName: AB split_barcode_output.pdf
mimeType: AB application/pdf
fileSize: # 125430
docName: AB split_barcode_output.pdf
barcodeSplitCompleted: ☑ true
barcodesDetected: # 3
filesGenerated: # 4
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual split PDF file data and metadata:
data
─────────────────────────────
File Name: split_barcode_output.pdf
File Extension: pdf
Mime Type: application/pdf
File Size: 122.5 KB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Automated Document Processing and Sorting
- Split incoming PDF documents based on barcode identifiers for automated routing to different departments or processes
- Process scanned documents with barcode separators to automatically organize them into individual files
- Automate the separation of multi-document batches based on unique barcode identifiers for streamlined processing
Invoice and Receipt Management
- Split combined invoice PDFs at barcode markers to create individual invoice files for each transaction
- Process receipt batches by splitting at barcode separators to organize receipts by date, store, or transaction type
- Automate the separation of financial documents based on barcode identifiers for accounting and record-keeping
Manufacturing and Quality Control
- Split production reports and quality control documents based on barcode identifiers for different product lines or batches
- Process inspection reports by splitting at barcode markers to create individual files for each inspection
- Automate the organization of technical documentation based on barcode identifiers for different components or processes