New: PDF to E-Invoice for Factur-X/ZUGFeRD, and PDF to PDF/A for archive-ready PDF/A-3b.

Automatically split PDFs added to Google Drive at pages containing matching barcodes. This example detects QR codes and Data Matrix barcodes and keeps the barcode pages in the output.

Prerequisites

  • PDF.co, Zapier, and Google Drive accounts.
  • A sample PDF containing QR codes or Data Matrix barcodes.
  • Separate Google Drive folders for source PDFs and split files.

Step 1: Set Up the Google Drive Trigger

Create a Zap and select Google Drive with the New File in Folder trigger.

Connect your Google account, select the drive and source folder, then test the trigger to retrieve your sample PDF.

Step 2: Configure Barcode Splitting

Add PDF.co and select Split PDF Based on Barcode Search.

Connect your PDF.co account by signing in and authorizing Zapier through OAuth.

Configure:

  • Source File URL: Map the File property from Google Drive.
  • Barcode Search String: Enter [[barcode:qrcode,datamatrix]].
  • Exclude Pages with Identified Barcodes: Select No to retain those pages.
  • File Name: Enter a base name such as split-document.
  • Custom Profiles: Leave blank.

The search string matches either barcode type, regardless of its encoded value. To restrict matching to values containing bytescout.com, use:

[[barcode:qrcode,datamatrix /bytescout\.com/]]

Choose Yes for Exclude Pages with Identified Barcodes only when those pages are separators that should be discarded.

See the barcode-splitting action documentation for configuration details.

Step 3: Test the Split

Test the PDF.co action and open the returned output URLs.

Confirm that the PDFs split at the intended barcode locations and that the barcode pages are retained. The number of output files depends on the matching pages in your document.

Step 4: Save Each Output PDF

To save every split file, add Looping by Zapier and select Create Loop From Line Items.

Create a value named pdf_url and map PDF.co’s urls list to it.

After the loop, add Google Drive’s Upload File action:

  • Folder: Select the split-files destination folder.
  • File: Map pdf_url from the Looping step.
  • Convert to Document: Select No.

Each loop iteration uploads one PDF. Keep the destination separate from the trigger folder to prevent repeated processing.

Step 5: Publish the Zap

Test the upload and verify the saved file. Publish the Zap to split and save new PDFs automatically.

This tutorial taught you how to split PDF pages with barcodes using Zapier.

Related Tutorials

See Related Tutorials