How to Split PDF Pages with Barcode using PDF.co and Zapier

In this tutorial, we will show you how to split PDF pages with barcode using PDF.co and Zapier.

We will use this 10 page document which has barcodes on each page for PDF.co to split out PDF pages from.

Setup

Create a Zap and link Google Drive:

Setup Google Drive in Zapier
Setup Google Drive in Zapier

Let’s set up the trigger.

  • In the Drive field, select My Google Drive.
  • In the Folder field, choose the specific folder where your file is located. ( note the barcode file cited in the introduction should be uploaded here)
  • Test the trigger and check we have the PDF file as a result in the data:
File data from Google Drive step
File data from Google Drive step

Add PDF.co App

  • Let’s add another app and select PDF.co. Then, choose the Custom API Call. This tool will make a custom call to PDF.co API.
Custom API call in PDF.co
Custom API call in PDF.co

Setup the action

Let’s set up the action.

  • For the PDF.co API Endpoint field, click on Custom and add v1/pdf/split2 as endpoint path.
  • For the URL input parameter override field, select the Web Content Link from Google Drive.
  • Under the Input JSON, add your JSON code as input parameters. For the JSON code sample please use the following:
{
    "searchString": "[[barcode:qrcode,datamatrix /bytescout\\.com/]]",
    "excludeKeyPages": true,
    "regexSearch": false,
    "caseSensitive": false,
    "inline": true,
    "name": "output-split-by-barcode",
    "async": false
}
PDF.co Split action in Zapier
PDF.co Split action in Zapier

Test & Check

  • After setting up, click on the test and review buttons to test the action.
Test the Split action
Test the Split action
  • Once the test is successful, copy the URLs and paste them into your browser to view the output.
Output data
Output data

You should receive 10 URLs to 10 PDF files split by barcode in the data set.

This tutorial taught you how to split PDF pages with barcodes using Zapier. You learned how to use the PDF.co Custom API Call to split PDF by barcode. You also learned how to use the v1/pdf/split2 endpoint to split PDF pages.