Case Study: See how Formable built DOCX redlining with Apryse in two months

Read Patch Code and Postal Barcodes From Scanned PDFs

The Apryse Server SDK Barcode Extraction Module reads Patch Code separator sheets and postal barcodes from scanned PDFs on your own Windows or Linux servers. Use the Patch Code results to split a scanned batch into separate documents. Use USPS Intelligent Mail and other postal barcodes to route mail. Each result comes back as JSON.

How the Apryse Barcode Extraction Module Reads Patch Code and Postal Barcodes in Scanned PDFs

The Barcode Extraction Module opens a scanned PDF, finds the barcodes on each page, and writes the decoded values to JSON. It belongs to the Smart Data Extraction add-on license and installs as a separate module download. Reading the codes is half the job. Your code uses the results to split the batch and route the mail, so the module rarely ships alone.

Split a Scanned Batch on Patch Code Separator Sheets

Copied to clipboard

A Patch Code is the document-separation barcode printed on a separator sheet. An operator slips one between documents before the stack goes through the scanner. The module locates each Patch Code in the JSON, so your code knows which pages are separators. Your code then splits the PDF at those pages with Page Manipulation, and each document becomes its own file.

Route Mail by Its Postal Barcode

Copied to clipboard

Postal barcodes sit on the mail piece. The module reads USPS Intelligent Mail (4-State), POSTNET, PLANET, Australia Post 4-State, and Royal Mail RM4SCC from the scanned PDF. By default, one extraction call searches for every supported type, so Patch Code and postal results arrive together in the same JSON. Your code maps each decoded value to a queue, a department, or a returned-mail record.

Settings by Batch Condition

Start with the default profile and change a setting only when the batch calls for it.

Batch Condition
Setting to Use
Speed Cost
Clean scans or born-digital PDFs
Default profile
Fastest
Noisy or low-resolution scanner output
Low quality source profile
Slightly slower
Small codes on dense forms
Small barcodes profile
Significantly slower
Separator sheets only on known pages
Page range
Reads only the pages you list
Only Patch Code or postal codes expected
Limit the search types to those groups
Shorter processing time
Separator sheets fed sideways
Add the vertical orientation
Shorter processing time. Orientation filtering applies to the Patch Code, Four State, and Post Net Planet groups.

Profile, search types, orientation, and page range are options on the object you pass as the last argument to the extraction call. The example below sets the low quality source profile, the Patch Code, Four State, and Post Net Planet groups, and a page range. A page range takes a single page such as 1, or ranges such as 1-3,5,10-. The barcode workflow docs list each option.

Sample JSON Output

Figure 1: Sample JSON output.

This page covers Apryse Server SDK integration using C# on Windows and Linux. This feature requires the Barcode Extraction Module add-on, which is a separate download from the base Server SDK. See the modules documentation for download and installation instructions.

What You Need to Read Patch Code and Postal Barcodes on Your Own Server

Copied to clipboard

Download the Barcode Extraction Module and expand it into your Server SDK directory. The module reads PDF input, so convert TIFF scans to PDF first. It runs on Windows and Linux only.

Document content stays in your infrastructure. Your code owns the batch loop, the split, and the routing, because the Server SDK provides no work queue, job scheduler, or batch orchestration. If codes still go unread, see fixing missed barcodes on scanned PDFs.

Setup Notes

Copied to clipboard

Where Patch Code and Postal Barcodes Fit in a Digital Mailroom

Inbound Mail Intake

Monday's mail arrives as one scanned PDF. Your code reads the postal barcode on each piece and sends it to the right queue, while your platform handles storage and notifications.

Batch Scanning With Separator Sheets

An operator drops a separator sheet between stacks of forms. The module reports each Patch Code, and your code splits the batch into one PDF per stack. After the split, run each document through OCR to read the text on each page.

Returned-Mail Handling

Scan the returned pieces, read the postal barcode on each one, and match the decoded value against your send records. Your team then knows which accounts need a new address.

Patch Code and Postal Barcode Support in Apryse and Scanbot SDKs

Both products read postal barcodes. Only the Apryse Barcode Extraction Module reads Patch Code.

Support Detail
Apryse Server SDK Barcode Extraction Module
Scanbot SDK
Where it runs
Your own Windows or Linux servers, on scanned PDFs
Mobile, web, Linux, and Windows, on live camera feeds and image files
Required gate
Barcode Extraction Module download and PDFNet initialization. See Setup Notes.
License key at initialization
Licensing tier
Smart Data Extraction add-on license. Split step: Page Manipulation
Tier
Patch Code
Supported
Not supported
Postal barcodes
USPS Intelligent Mail (4-State), POSTNET, PLANET, Australia Post 4-State, and Royal Mail RM4SCC
Supported: USPS Intelligent Mail, RM4SCC, Australia Post 4-State, Japan Post 4-State, and KIX
Docs link
Docs link (Windows)

If you scan envelopes with a camera, use the Scanbot SDK instead.

Each link opens the Server SDK get-started page for that language.

Get Started With the Barcode Extraction Module in Your Language

Sanity Image
Sanity Image
Sanity Image
Sanity Image
Sanity Image
Sanity Image
Sanity Image
Sanity Image
Sanity Image
Sanity Image

Frequently Asked Questions

Use the Apryse Server SDK Barcode Extraction Module to find the Patch Code on each separator sheet in the scanned PDF, then split the batch at those pages with the Server SDK. Your code reads the JSON results, collects the separator pages, and passes them to Page Manipulation. Limit the search to the Patch Code group and add the vertical orientation for sheets fed sideways.

The Apryse Server SDK Barcode Extraction Module reads USPS Intelligent Mail (4-State), POSTNET, PLANET, Australia Post 4-State, and Royal Mail RM4SCC barcodes from scanned PDFs on Windows and Linux servers. Each decoded value comes back as JSON for your code to route. Camera scanning of envelopes belongs to the Scanbot SDK.

A digital mailroom scans incoming mail to PDF and runs barcode extraction on a server, where the Apryse Server SDK Barcode Extraction Module returns each Patch Code and postal barcode as JSON for splitting and routing. Your platform stores the files and your code runs the batch loop. The module returns the values, and routing stays in your application.

Yes, after conversion: the Apryse Server SDK converts the TIFF scan to PDF, and the Barcode Extraction Module then reads the barcodes in the PDF. The base Server SDK handles the TIFF to PDF step. The Barcode Extraction Module itself takes PDF input.

Start Reading Patch Code and Postal Barcodes on Your Servers

Get a trial key and run the Barcode Extraction Module on your own batch and mail PDFs.