ZXing Alternative: PDF417 Barcode OCR API

ZXing compared with the StructOCR REST API for driver license pdf417 extraction: deployment, pricing model, and when each fits.

What ZXing Is

ZXing and its zxing-cpp port are open-source barcode libraries that decode PDF417 among many formats. Choosing between it and an API comes down to where processing runs, how you pay, and which documents you need.

Where StructOCR Differs

StructOCR is a server-side REST API: you send an image and receive structured JSON for driver license pdf417. There is no SDK to embed, billing is 2 credits per successful request, credits never expire, and failed requests are not billed. See the Driver License PDF417 API docs or try the free scanner.

Where This Fits

  • Choose ZXing when: your images are clean scans and you will build AAMVA parsing and capture handling yourself.
  • Choose StructOCR when: you need phone photos handled with retries, AAMVA parsing, and explicit capture hints out of the box.
  • Use both when: You capture on a device with one tool and need server-side extraction or a fallback for uploaded images with the other.
Need more testing? Create a free account to get 200 free credits (equals 100 Passport scans).

Try the API in a Few Lines

A complete request takes one HTTP call with your API key.

Prerequisite: Python 3.9+, `pip install requests`, and a STRUCTOCR_API_KEY

PYTHON EXAMPLE
import base64
import os
import requests

with open("license-back.jpg", "rb") as image_file:
    image = base64.b64encode(image_file.read()).decode("ascii")

response = requests.post(
    "https://api.structocr.com/v1/driver-license-pdf417",
    headers={"x-api-key": os.environ["STRUCTOCR_API_KEY"]},
    json={"img": image},
    timeout=30,
)
response.raise_for_status()
data = response.json()["data"]
print("document_kind:", data.get("document_kind"))
print("document_number:", data.get("document_number"))
print("date_of_birth:", data.get("date_of_birth"))
print("region:", data.get("region"))

Technical Specs

  • •Endpoint: POST https://api.structocr.com/v1/driver-license-pdf417
  • •Authentication: x-api-key request header
  • •Inputs: JPG, PNG, or WebP as Base64 JSON; maximum 4.5MB
  • •Price: 2 credits per successful request; failed requests are not billed
  • •Free trial: 200 free credits on sign-up, no credit card required

Key Features

  • •Deployment: StructOCR runs as a hosted API, so there is nothing to install or update on devices.
  • •Pricing model: Prepaid credits that never expire; you are billed only for successful extractions.
  • •Evaluate on your own images: Compare tools on real customer photos, including glare, blur, and unusual issuers.
  • •No vendor claims here: Check each vendor’s current documentation for features and pricing; this page describes publicly stated product categories only.

Response Shape

Illustrative fields returned by the StructOCR API for this document type.

{
  "success": true,
  "data": {
    "document_kind": "…",
    "document_number": "…",
    "date_of_birth": "…",
    "region": "…"
  }
}

Frequently Asked Questions

Is StructOCR a drop-in replacement for ZXing?

It replaces the data-extraction step when you can send images to a server. It does not replace on-device capture SDKs or verification features that StructOCR does not offer.

How can I compare them fairly?

Run the same set of real, consented customer images through both and compare field accuracy, failure handling, and cost per successful result.

Is there a free trial?

Yes. New accounts receive 200 free credits with no credit card.

You May Also Like

Related tutorials, platform guides, and comparisons

Country Tutorial

Maine Driver License OCR: Extract Fields with Python

Extract visible fields from Maine driver license images into JSON. Map identifiers, names and dates, with a review workflow for incomplete results.

Python · Driver License
Tutorial

Amazon Textract AnalyzeID Alternative: Driver License OCR API

Amazon Textract AnalyzeID compared with the StructOCR REST API for driver license, passport, national id card extraction: deployment, pricing model, and when each fits.

Driver License
Tutorial

Node.js US Driver License PDF417 API Tutorial

Decode US driver license PDF417 barcodes with Node.js. Send a license-back image, parse AAMVA fields, and handle unreadable barcode errors safely.

Node.js · Driver License
Tutorial

Canada Provincial ID Card PDF417 Barcode API

Decode AAMVA PDF417 barcodes on Canadian provincial ID cards and licenses into JSON with ISO dates, postal codes, and an explicit document_kind.

Driver License
Country Tutorial

Idaho Driver License OCR: Extract Fields with Python

Extract visible fields from Idaho driver license images into JSON. Map identifiers, names and dates, with a review workflow for incomplete results.

Python · Driver License
Country Tutorial

Brazil Driver License OCR with Python SDK

Extract structured fields from a Brazil Carteira Nacional de Habilitação (CNH) with the StructOCR Python SDK and FastAPI.

Python · Driver License
Country Tutorial

Australia Driver License OCR with Python SDK

Extract structured fields from a Australia state or territory driver licence with the StructOCR Python SDK and FastAPI.

Python · Driver License
Country Tutorial

Australia Driver License OCR with Node.js SDK

Extract structured fields from a Australia state or territory driver licence with the StructOCR Node.js SDK and TypeScript + Express.

Node.js · Driver License
Country Tutorial

Brazil Driver License OCR with Node.js SDK

Extract structured fields from a Brazil Carteira Nacional de Habilitação (CNH) with the StructOCR Node.js SDK and TypeScript + Express.

Node.js · Driver License
Tutorial

AAMVA PDF417 Element IDs Reference (DAQ, DCS, DBB)

What the three-letter AAMVA data element IDs on US and Canadian license barcodes mean, from DAQ and DCS to DBB, DBA, and DCF.

Driver License

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

From tutorial to production in 5 minutes.

You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.

Instant Access Cancel Anytime No Credit Card