What are the Best PDF417 Reading SDKs?
PDF417 (Portable Data File 417) is a stacked linear barcode format widely used in transport, identification cards, and inventory management.1 Its high data capacity — up to 1,850 alphanumeric characters or 2,710 numeric digits — makes it the format of choice for applications that require storing large amounts of information in a compact space.
PDF417 barcodes appear on US driver’s licenses, airline boarding passes, patient wristbands, shipping labels, and government-issued IDs. Choosing the right PDF417 barcode reading SDK directly impacts the reliability of these applications.
PDF417 on a US driver’s license:

A PDF417 has five parts: start pattern, left row indicator, data codewords, right row indicator and stop pattern.
PDF417 barcodes can be read with both laser scanners and cameras. However, reading PDF417 in real-world conditions — where images may be blurry, poorly lit, or printed on curved surfaces — is a genuine challenge for barcode recognition engines.
This article is Part 3 in a 3-Part Series.
In this article, we benchmark four popular PDF417 barcode reading SDKs against a public, real-world image dataset to determine which delivers the best reading accuracy and speed.
PDF417 Benchmark Dataset
There are several studies about reading PDF417. A recent study uses semantic segmentation to detect barcodes and provides a public dataset.
The dataset has 921 real images and 30,000+ synthetic images. It contains a large number of different barcode types (Code128, EAN13, DataMatrix, Aztec, QR, PDF417, and many more). We are going to run the benchmark based on the real images which have readable PDF417 codes. The final PDF417 subset has 78 images with 88 PDF417 codes on bottles, boarding passes and scanned documents.

PDF417 Barcode Reading SDKs Under Test
Four PDF417 barcode reading libraries are evaluated:
The runtime settings are set to decode PDF417 codes only (code snippets).
Benchmark Methodology
The test tool and evaluation metrics follow the same methodology as in the QR code reading benchmark.
The test is run on a PC device with an Intel i5-10400 CPU and 16GB memory.
PDF417 Benchmark Results
Reading rate
Reading rate (detected codes number / total codes number) in percentage:
| Engine | Result |
|---|---|
| Dynamsoft | 95.45% |
| ML Kit | 61.36% |
| ZXingCPP | 52.27% |
| Apple Vision | 30.68% |
Speed
Runtime per image (in milliseconds):
| Engine | Result |
|---|---|
| Dynamsoft | 586.64 ms |
| ML Kit | 304.22 ms |
| ZXingCPP | 127.56 ms |
| Apple Vision | 693.96 ms |
Dynamsoft Barcode Reader achieved the highest accuracy at 95.45%, more than 34 percentage points above the next-best library (ML Kit at 61.36%). ZXingCPP ranked third at 52.27%, while Apple Vision trailed at 30.68%.
On speed, ZXingCPP was fastest at 127.56 ms per image, while Dynamsoft processed each image in 586.64 ms — a reasonable trade-off given its substantially higher accuracy. Apple Vision was the slowest at 693.96 ms.
You can explore the detailed per-image results on the benchmark results page.
Optimize the Performance of Dynamsoft Barcode Reader
Dynamsoft Barcode Reader exposes a rich set of runtime parameters that developers can fine-tune for specific use cases and image conditions.2 For this dataset, the following parameter adjustments can further increase the reading rate beyond 95.45%.
Here are two effective techniques for handling difficult PDF417 images:
-
GrayscaleEnhancementModes
Some images have a lot of noise. We can use
GEM_GRAY_SMOOTHto reduce noise.Example:

In the Capture Vision framework, this is configured via
GrayscaleEnhancementModesinside anEnhanceGrayscaleStagestage object withinImageParameterOptions:{ "ImageParameterOptions": [ { "Name": "ip-smooth", "ApplicableStages": [ { "Stage": "SST_ENHANCE_GRAYSCALE", "GrayscaleEnhancementModes": [ { "Mode": "GEM_GRAY_SMOOTH", "SmoothBlockSizeX": 10, "SmoothBlockSizeY": 10 } ] } ] } ] }Learn more about grayscale enhancement here.
-
Scan Region
Some images have low contrast and it is difficult to locate the barcodes. We can define a
TargetROIDefin the template to restrict decoding to a specific region of the image, which also speeds up processing.
Learn more about how to define a region of interest with
TargetROIDefhere.
Code Snippets Used for the Testing
Here are the code snippets to specify the PDF417 barcode format.
DBR (Capture Vision API):
from dynamsoft_barcode_reader_bundle import *
LicenseManager.init_license("YOUR_LICENSE_KEY")
cvr = CaptureVisionRouter()
# Load a template that restricts decoding to PDF417
cvr.init_settings_from_file("template.json")
result = cvr.capture(img_path, "ReadPDF417")
ML Kit:
// Podfile: pod 'GoogleMLKit/BarcodeScanning', '8.0.0'
let format = BarcodeFormat.PDF417
let barcodeOptions = BarcodeScannerOptions(formats: format)
let barcodeScanner = BarcodeScanner.barcodeScanner(options: barcodeOptions)
Apple Vision:
let barcodeRequest = VNDetectBarcodesRequest()
barcodeRequest.symbologies = [.pdf417]
ZXingCPP:
import cv2, zxingcpp
img = cv2.imread(img_path)
results = zxingcpp.read_barcodes(img, formats=zxingcpp.BarcodeFormat.PDF417)
Try Dynamsoft Barcode Reader
Dynamsoft Barcode Reader supports PDF417 and 20+ other barcode formats. It is available for Windows, Linux, macOS, iOS, Android, and web platforms.
Summary
| SDK | Reading Rate | Speed (ms/image) |
|---|---|---|
| Dynamsoft Barcode Reader | 95.45% | 586.64 |
| Google ML Kit | 61.36% | 304.22 |
| ZXingCPP | 52.27% | 127.56 |
| Apple Vision | 30.68% | 693.96 |
For applications where PDF417 read accuracy is critical — such as driver’s license scanning, boarding pass verification, or patient ID wristbands — Dynamsoft Barcode Reader offers the best accuracy among the four SDKs tested. ZXingCPP is the fastest option but sacrifices significant accuracy. For use cases where speed and accuracy must both be considered, Dynamsoft provides tunable parameters to optimize performance for specific image conditions.
Frequently Asked Questions
What is the most accurate PDF417 barcode reading SDK?
In this benchmark on 88 real-world PDF417 codes, Dynamsoft Barcode Reader achieved 95.45% accuracy — the highest of the four SDKs tested (Dynamsoft, Google ML Kit, Apple Vision, and ZXingCPP).
What is PDF417 used for?
PDF417 is a high-capacity stacked barcode used in US driver’s licenses (AAMVA standard), airline boarding passes, shipping labels, government-issued IDs, and medical wristbands.
How does PDF417 compare to QR code?
PDF417 stores more data than a standard QR code (up to 1,850 alphanumeric characters) and is readable by both laser scanners and cameras. QR codes are more compact and omni-directional, making them better for mobile scanning. PDF417 is preferred when compatibility with legacy laser scanners is required.
How can I improve PDF417 detection accuracy in poor-quality images?
Dynamsoft Barcode Reader supports grayscale enhancement modes (e.g., GEM_GRAY_SMOOTH for noise reduction via GrayscaleEnhancementModes in the Capture Vision template) and region-of-interest configuration to boost accuracy in challenging conditions such as low contrast, noise, or curved surfaces.