PDF417 Barcode Scanner SDK Benchmark: Accuracy and Speed Compared

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:

PDF417 barcode 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 barcode structure: 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.

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.

What you’ll build: A side-by-side accuracy and speed comparison of four PDF417 barcode reading SDKs — Dynamsoft Barcode Reader, Google ML Kit, Apple Vision, and ZXingCPP — tested on 88 real-world PDF417 codes from a public dataset.

Key Takeaways

  • Dynamsoft Barcode Reader achieves 98.86% reading accuracy on real-world PDF417 images — nearly 38 percentage points higher than the next-best SDK (Google ML Kit at 61.36%).
  • ZXingCPP is the fastest decoder at 127.56 ms per image, but its accuracy (52.27%) is roughly half that of Dynamsoft.
  • Apple Vision Framework has the lowest accuracy (30.68%) and the slowest speed (693.96 ms) among the four SDKs tested.
  • For driver’s license scanning, boarding passes, and government IDs, PDF417 accuracy is more important than raw speed — Dynamsoft offers tunable parameters to optimize both.
SDK Reading Rate Speed (ms/image)
Dynamsoft Barcode Reader 98.86% 194.52
Google ML Kit 61.36% 304.22
ZXingCPP 52.27% 127.56
Apple Vision 30.68% 693.96

Common Developer Questions

Which SDK has the highest PDF417 barcode reading accuracy in a real-world benchmark?

Dynamsoft Barcode Reader had the highest PDF417 accuracy in this benchmark at 98.86%. The next-best result was Google ML Kit at 61.36%, with ZXingCPP at 52.27% and Apple Vision at 30.68%.

How fast is ZXingCPP compared to Dynamsoft Barcode Reader for PDF417 decoding?

ZXingCPP was faster than Dynamsoft in this test, averaging 127.56 ms per image versus 194.52 ms. The tradeoff is accuracy: ZXingCPP decoded 52.27% of the PDF417 codes, while Dynamsoft decoded 98.86%.

How do I improve PDF417 detection on noisy or low-contrast images?

For noisy or low-contrast PDF417 images, the article recommends preprocessing before decoding rather than relying on default settings. In particular, GEM_GRAY_SMOOTH helps suppress noise, and the Capture Vision template can further improve results with grayscale enhancement and region-of-interest tuning.

Prerequisites

To reproduce the benchmark or test PDF417 reading in your own project, you need one or more of the SDKs listed below. For Dynamsoft Barcode Reader, get a 30-day free trial license.

Benchmark Dataset: 78 Real-World PDF417 Images

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.

Sample images from the PDF417 benchmark dataset including bottles, boarding passes, and scanned documents

SDKs Under Test

Four PDF417 barcode reading libraries are evaluated:

  1. Dynamsoft Barcode Reader
  2. Google ML Kit
  3. Apple Vision Framework
  4. ZXingCPP

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: Accuracy and Speed Compared

Reading Rate by SDK

Reading rate (detected codes number / total codes number) in percentage:

Engine Result
Dynamsoft 98.86%
ML Kit 61.36%
ZXingCPP 52.27%
Apple Vision 30.68%

PDF417 reading rate comparison chart: Dynamsoft 98.86%, ML Kit 61.36%, ZXingCPP 52.27%, Apple Vision 30.68%

Decoding Speed by SDK

Runtime per image (in milliseconds):

Engine Result
Dynamsoft 194.52 ms
ML Kit 304.22 ms
ZXingCPP 127.56 ms
Apple Vision 693.96 ms

PDF417 decoding speed comparison chart: average milliseconds per image for Dynamsoft, ML Kit, ZXingCPP, and Apple Vision

Dynamsoft Barcode Reader achieved the highest accuracy at 98.86%, nearly 38 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 194.52 ms. Apple Vision was the slowest at 693.96 ms.

You can explore the detailed per-image results on the benchmark results page.

Improve PDF417 Detection Accuracy with 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 The parameters below are useful when individual PDF417 images are unusually noisy or low-contrast.

Here are two effective techniques for handling difficult PDF417 images:

  1. GrayscaleEnhancementModes

    Some images have a lot of noise. We can use GEM_GRAY_SMOOTH to reduce noise.

    Example:

    PDF417 barcode image with heavy noise requiring image preprocessing before reading

    In the Capture Vision framework, this is configured via GrayscaleEnhancementModes inside an EnhanceGrayscaleStage stage object within ImageParameterOptions:

     {
       "ImageParameterOptions": [
         {
           "Name": "ip-smooth",
           "ApplicableStages": [
             {
               "Stage": "SST_ENHANCE_GRAYSCALE",
               "GrayscaleEnhancementModes": [
                 {
                   "Mode": "GEM_GRAY_SMOOTH",
                   "SmoothBlockSizeX": 10,
                   "SmoothBlockSizeY": 10
                 }
               ]
             }
           ]
         }
       ]
     }
    

    Learn more about grayscale enhancement here.

  2. Scan Region

    Some images have low contrast and it is difficult to locate the barcodes. We can define a TargetROIDef in the template to restrict decoding to a specific region of the image, which also speeds up processing.

    Defining a scan region to improve PDF417 detection on low-contrast images

    Learn more about how to define a region of interest with TargetROIDef here.

Code Snippets for PDF417 Decoding

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.

Download Offline SDK

Summary

SDK Reading Rate Speed (ms/image)
Dynamsoft Barcode Reader 98.86% 194.52
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.

Common Issues and Edge Cases

  • Noisy or low-resolution images: PDF417 decoding accuracy drops sharply on images with heavy noise or compression artifacts. Apply grayscale smoothing (GEM_GRAY_SMOOTH) before decoding to recover unreadable barcodes.
  • Partial or occluded barcodes: If the start or stop pattern is cut off, most SDKs will fail to recognize the barcode. Ensure the full barcode area — including quiet zones — is captured in the image.
  • Curved or warped surfaces: PDF417 codes printed on bottles or cylindrical packaging are distorted. Dynamsoft’s deformation resistance modes can handle moderate curvature, but severely warped codes may require multi-angle capture.

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 98.86% 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.

Which PDF417 SDK is fastest for high-throughput scanning?

ZXingCPP is the fastest at 127.56 ms per image, but its accuracy (52.27%) is roughly half that of Dynamsoft Barcode Reader (98.86%). For high-throughput scenarios that also require high accuracy, Dynamsoft offers runtime parameter tuning to balance speed and detection rate.

Reproducibility

A reading rate without a dataset is an opinion; a reading rate without code is an assertion. Both are published here, so the table above can be checked instead of trusted.

What you need Where it is
78 images and 88 PDF417 ground-truth annotations project page, project_manifest.json (1,756 B, SHA-256 b44a499a6462…)
Per-image output for all four SDKs results.zip (320,109 B, SHA-256 eef54a28a479…) — 78 records each for Dynamsoft, ML Kit, Apple Vision and ZXingCPP, plus the settings file used
The runner examples/official/benchmark-legacy/pdf417
python common/download_dataset.py --project PDF417 --output datasets/PDF417
python common/benchmark_dynamsoft.py \
  --dataset datasets/PDF417 --project PDF417 --output datasets/PDF417/current_run

The runner pins dynamsoft-capture-vision-bundle==3.6.5000 and restricts decoding to PDF417. It re-executes the Dynamsoft column on any Windows, Linux or macOS machine. The ML Kit and Apple Vision columns are recorded per image in results.zip; re-executing those two requires the on-device harness on Android and iOS respectively, and ZXingCPP re-runs from the same Python package as Dynamsoft. Each ground-truth file stores the PDF417 payload plus its four corner coordinates, so scores can be recomputed from the raw records without touching an SDK.

References