Split by Barcode is a PDF4me action for Zapier that cuts one scanned batch into separate PDFs wherever a barcode appears. A six step Zap watches Dropbox, filters for PDFs, splits on a QR code, loops over the resulting documents, and saves each one with its own name and log line.
Scan twenty invoices in one pass and you get one PDF with eighty pages. Splitting it by page number only works if every invoice is the same length, and they never are. A barcode separator sheet solves that: the split happens wherever the barcode is, whatever the page count. These screenshots come from a Zap that ran on 03 November 2026.
Put a separator page carrying a QR code in front of every document, scan the whole stack as one PDF, and drop it in Dropbox. PDF4me splits the batch at each barcode, Looping by Zapier walks the resulting list, and every document is saved individually as AP-Batch-Scan-Nov-01_1.pdf, _2.pdf and so on, each with a line in a log file.
Why-Based Q&A
Why split on a barcode rather than a page count? Page counts vary. One invoice is two pages, the next is five. A barcode separator marks the boundary explicitly, so the split is correct whatever the lengths are. It is the only method that survives a mixed batch.
Why is a loop needed at all? Split by Barcode returns a list of documents, not one file. Without a loop, the Zap would only handle the first item. Looping by Zapier turns that list into one pass per document, so step 5 runs as many times as there were barcodes.
Why "Before the barcode" for the split page? The separator sheet belongs to the document that follows it, not the one before. Splitting before the barcode starts each new file at its own separator. Choosing After would attach every separator to the previous document.
Why 150 for PDF Render Dpi? The action rasterises pages to find barcodes. Too low and a dense code is unreadable, too high and the step is slow for a long batch. 150 reads a standard QR separator reliably without making a eighty page scan crawl.
What You'll Get
Input: one scanned PDF containing several documents, each preceded by a page carrying a QR code. Output: one PDF per document in /SplitBarcodeAP/Output, numbered from the batch name, plus one line per document in /SplitBarcodeAP/Log/split-barcode-log.txt.
What You Need
- Zapier. Open the PDF4me Zapier app. Six steps plus Looping, so a paid Zapier plan is required.
- PDF4me API key. Get your API key. Connect it the first time you add a PDF4me action.
- Dropbox with /SplitBarcodeAP/Input, /SplitBarcodeAP/Output and /SplitBarcodeAP/Log.
- Separator pages carrying a QR code whose text starts with a known string. This build uses
PDF4me Barcode.
Grab the samples first. The input is a batch with two documents separated by a QR page. The two outputs are what the Zap produced from it.
The Flow at a Glance
- New File in Folder (Dropbox trigger, polls every 2 minutes).
- Filter conditions (Filter by Zapier) continues only for PDFs.
- Split by Barcode (PDF4me) cuts the batch at each QR code.
- Create Loop From Line Items (Looping by Zapier) iterates the results.
- Upload File (Dropbox) saves each document.
- Create or Append to Text File (Dropbox) logs each document.
Complete flow overview

A successful run on 03 November 2026. Steps 5 and 6 sit inside the loop, so they repeat once per split document.
Step 1: How do you watch a Dropbox folder for scanned batches?
Flow so far: nothing yet, this is the trigger.
- Add Dropbox as the trigger app and pick the New File in Folder event.
- Configure:
- Space:
Default - Folder:
/SplitBarcodeAP/Input - Include files in subfolders?:
False - Include file contents?:
Yes - Include sharing link?:
No
- Space:
New File in Folder configuration

Scanners often write a temporary file first. If your scanner does, point the trigger at the folder it moves the finished scan into, not the one it writes into.
Step 2: Why filter before splitting?
Flow so far: New File in Folder.
- Add Filter by Zapier and open Filter conditions.
- Set Only continue if: 1. File Ext
(Text) Containspdf.
Filter conditions configuration

Splitting is the most expensive step in this Zap, so gating it matters more here than in a lighter workflow. See Zapier's filter guide for stricter rules.
Step 3: How does Split by Barcode decide where to cut?
Flow so far: New File in Folder plus Filter conditions.
Four required fields control the split. The barcode text and filter decide which codes count, and the split page decides which side of the separator the cut falls on.
- Add PDF4me and pick the Split by Barcode action.
- Configure:
- File: the File output of step 1
- Specify File Name: the File Name from step 1, here
AP-Batch-Scan-Nov-01 - Barcode Text:
PDF4me Barcode - Barcode Filter:
Starts with - Barcode Type:
Only QR Code - Split Barcode Page:
Before the barcode - PDF Render Dpi:
150 - Combine Pages with Same Barcodes:
False - Return as Zip:
False
Split by Barcode parameters
| Field | Value used | What it controls |
|---|---|---|
| File | File from step 1 | The scanned batch. Supply either File or File URL. |
| Specify File Name | AP-Batch-Scan-Nov-01 | Base name the split documents are numbered from. |
| Barcode Text | PDF4me Barcode | The text the separator barcode carries. |
| Barcode Filter | Starts with | How Barcode Text is matched. Required. |
| Barcode Type | Only QR Code | Restricts detection to one symbology. Required. |
| Split Barcode Page | Before the barcode | Which side of the separator the cut falls on. Required. |
| PDF Render Dpi | 150 | Rasterisation quality used to read the codes. Required. |
| Combine Pages with Same Barcodes | False | True merges every section sharing a barcode value into one file. |
| Return as Zip | False | False returns a list of documents, which is what the loop needs. |

Return as Zip stays False on purpose. A zip would be a single file, and the loop in step 4 needs the individual documents.
Tip. Barcode Type is set to Only QR Code here, which makes detection faster and avoids a stray Code 128 on an invoice being mistaken for a separator. Widen it only if your separators genuinely use several symbologies.
Step 4: How do you handle the list of split documents?
Flow so far: New File in Folder plus Filter conditions plus Split by Barcode.
Step 3 returns many documents. A loop turns that list into one iteration per document, and everything after it runs once per item.
- Add Looping by Zapier and pick Create Loop From Line Items.
- Under Values to Loop, add two value sets:
urlmapped to 3. Documents File Urlnamemapped to 3. Documents File Name
- Configure:
- Trim Whitespace:
True - Loop iteration counter start:
1 - Maximum number of Loop iterations:
500
- Trim Whitespace:
Create Loop From Line Items configuration

Both value sets matter. The url is what gets uploaded, the name is what the file is called, and they stay aligned because they come from the same line item.
Tip. Zapier labels Looping as a beta feature in the step itself, and it has real caps. Read how to create loops and the looping limitations before you point this at a batch of hundreds.
Step 5: Where does each split document go?
Flow so far: New File in Folder plus Filter conditions plus Split by Barcode plus Create Loop From Line Items.
This step and the next sit inside the loop, so they run once per document.
- Add Dropbox and pick the Upload File action.
- Configure:
- Space: leave unset
- Folder:
/SplitBarcodeAP/Output - File: the Url value from the loop, step 4
- Overwrite:
True - Specify File Name: the Name value from the loop, here
AP-Batch-Scan-Nov-01_1 - Specify File Extension:
pdf - Include sharing link?:
Yes
Upload File configuration

Both File and Specify File Name come from the loop rather than from step 3 directly. That is what keeps document 2's bytes paired with document 2's name.
Step 6: How do you log every document that was produced?
Flow so far: all five previous steps, with 5 and 6 repeating per document.
- Add Dropbox and pick the Create or Append to Text File action.
- Configure:
- Space: leave unset
- Folder:
/SplitBarcodeAP/Log - File Name:
split-barcode-log.txt - File Content: the literal text
Split OK:followed by the Name value from the loop - Include sharing link?:
Yes
Create or Append to Text File configuration

Because this runs inside the loop, a batch of twelve documents produces twelve log lines, which is the quickest way to confirm the split count was right.
Run the Flow and Verify
- Publish the Zap.
- Put a separator page in front of each document, scan the stack as one PDF, and drop it into /SplitBarcodeAP/Input.
- Open Zap runs and check the loop reports as many iterations as you had separators.
- Open /SplitBarcodeAP/Output and confirm one file per document, numbered _1, _2 and so on, then check split-barcode-log.txt has the matching lines.
What did you actually build? A mailroom. One scan pass replaces the sorting, and the separator sheet carries the instruction instead of a person remembering it. Point the same shape at purchase orders, delivery notes or signed contracts and only the barcode text changes.
Common Variations You Can Add Without Rebuilding
Barcode splitting vs page-number splitting
| Method vs method | Split by Barcode | Split by page number |
|---|---|---|
| Documents of varying length | Handled, the barcode marks the boundary | Breaks as soon as lengths differ |
| Setup per batch | None, the separator sheets travel with the paper | Someone works out the page numbers |
| Who prepares it | Whoever stacks the paper | Whoever opens the PDF afterwards |
| Scales to a hundred documents | Yes, one scan pass | Not realistically |
| Needs a separator page | Yes | No |
Common questions
How do I split a PDF into multiple files?
Pick a rule for where the cuts fall. The usual rule is page numbers, which this action replaces with barcodes. PDF4me's Split by Barcode scans each page, finds the codes that match your Barcode Text and Barcode Filter, and returns a separate document for each section.
How do I split PDF pages into different files?
If you want every page as its own file, barcode splitting is the wrong tool and a plain Split PDF action is simpler. Barcode splitting exists for the case where a file boundary is not the same as a page boundary, which is exactly what a scanned batch of multi page documents is.
What barcode types can be used to split a PDF?
The Barcode Type dropdown selects the symbology the action looks for. This build uses Only QR Code, which keeps detection fast and avoids matching an unrelated barcode printed on an invoice. Restricting the type is usually the right call when your separator sheets are under your control.
Can I split a PDF without knowing the page numbers?
That is the whole point of this method. You never state a page number anywhere in the Zap. The separator pages carry the boundary information, so a batch whose documents are two, five and nine pages long splits correctly without anybody counting.
Troubleshooting
No barcode matched, so the batch was never cut. Check that Barcode Text matches what the separator actually encodes, that Barcode Filter is Starts with rather than an exact match, and that Barcode Type is not excluding your symbology.
PDF Render Dpi is too low for the print quality. Raise it from 150 and retest. Skewed or faint separator sheets are the other usual cause, so reprint them rather than pushing DPI far up.
Steps 5 and 6 are outside the loop, or Return as Zip is True so there is only one item to iterate. Both put the Zap back to handling a single file.
Split Barcode Page is set to After rather than Before. Before the barcode starts each new document at its own separator, which is what separator sheets are for.
Next Steps
The same six step pattern (watch, gate, split, loop, save, log) handles any "one file in, many files out" automation.
