Driver License OCR vs PDF417 API
Compare front-side driver license OCR with back-side PDF417 and AAMVA parsing. Choose the right endpoint or combine both in one review workflow.
What the Failure Means
Front OCR and back-barcode parsing solve different problems. Treating them as interchangeable can hide capture errors or omit fields that exist only on one side of the credential.
A Reliable Recovery Path
Use /v1/driver-license for visible front-side fields and international licenses. Use /v1/driver-license-pdf417 for deterministic AAMVA data from US license backs; compare the two only as an application-level review signal. Consult the PDF417 error reference for status codes and use the scanner with fictional or authorized samples while tuning capture guidance.
Where This Workflow Fits
- Front image uses OCR endpoint: Validate this condition before the image leaves the capture screen.
- US back uses PDF417 endpoint: Include this check in support guidance and quality monitoring.
- No AI guessing for barcode fields: Include this check in support guidance and quality monitoring.
Handle the Result Explicitly
Treat capture errors as application states. Never substitute guessed identity values when the barcode cannot be validated.
Prerequisite: A server-side API integration and a capture UI that can request a new license-back image
# Front-side or international license
front = requests.post("https://api.structocr.com/v1/driver-license", headers=headers, json={"img": front_b64})
# Back-side US AAMVA barcode
back = requests.post("https://api.structocr.com/v1/driver-license-pdf417", headers=headers, json={"img": back_b64})
# Your application decides how to review differences.
print(front.json().get("data"), back.json().get("data"))Technical Specs
- •Endpoint: POST https://api.structocr.com/v1/driver-license-pdf417
- •Success status: HTTP 200 after barcode and required AAMVA data are usable
- •Unreadable barcode: HTTP 422 with PDF417_NOT_DECODED
- •Invalid record: HTTP 422 with AAMVA_NOT_VALID
- •Processing failures: Refunded according to the endpoint behavior
- •Safety rule: Never infer missing barcode fields from an unsuccessful response
Key Features
- •Front image uses OCR endpoint: Make this condition visible in capture guidance, validation, or review tooling.
- •US back uses PDF417 endpoint: Make this condition visible in capture guidance, validation, or review tooling.
- •No AI guessing for barcode fields: Make this condition visible in capture guidance, validation, or review tooling.
- •Mismatches go to review: Make this condition visible in capture guidance, validation, or review tooling.
Example Recoverable Error
This illustrative error contains no personal data. Use the error code, rather than free-form text, to select the next application action.
{
"success": false,
"error": "PDF417_NOT_DECODED",
"message": "Upload a clear image of the complete back of the US driver license or State ID."
}Frequently Asked Questions
Are failed PDF417 processing attempts charged?
The endpoint charges 2 credits for a successful decode; documented processing failures are refunded.
Can generative OCR fill fields when PDF417 decoding fails?
Do not present inferred values as barcode data. Ask for a retake or use the separate front-side OCR endpoint with a clearly identified source.
What should be logged?
Log request IDs, status, error code, timing, and capture-quality signals. Avoid logging raw images, Base64 payloads, or complete identity responses.
You May Also Like
Related tutorials, platform guides, and comparisons
Singapore Driver License OCR: Extract Fields with Python
Extract visible fields from Singapore driver license images into JSON. Map identifiers, names and dates, with a review workflow for incomplete results.
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.
Texas Driver License PDF417 API
Decode the PDF417 barcode on the back of a Texas driver license or State ID and return normalized AAMVA fields as structured JSON.
Kenya Driver License OCR: Extract Fields with Python
Extract visible fields from Kenya driver license images into JSON. Map identifiers, names and dates, with a review workflow for incomplete results.
Ireland Driver License OCR: Extract Fields with Python
Extract visible fields from Ireland driver license images into JSON. Map identifiers, names and dates, with a review workflow for incomplete results.
UK Driver License OCR with Node.js SDK
Extract structured fields from a United Kingdom photocard driving licence with the StructOCR Node.js SDK and TypeScript + Express.
US Driver License OCR with Python SDK
Extract structured fields from a United States state-issued driver license with the StructOCR Python SDK and FastAPI.
UK Driver License OCR with Python SDK
Extract structured fields from a United Kingdom photocard driving licence with the StructOCR Python SDK and FastAPI.
Driver License PDF417 Glare and Blur Capture Guide
Design a better driver license barcode capture flow by controlling glare, motion blur, distance, perspective, and image compression.
US Driver License OCR with Node.js SDK
Extract structured fields from a United States state-issued driver license with the StructOCR Node.js SDK and TypeScript + Express.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add Driver's License OCR to Your Bolt.new App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a Bolt.new app. Build car rental and mobility onboarding flows right in your browser.
Add Driver's License OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API using the Cursor AI code editor. Build car rental and mobility onboarding flows rapidly.
Add Driver's License OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a Lovable.dev app. Build car rental and mobility onboarding flows with zero backend.
Add Driver's License OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a Replit application. Build car rental and mobility onboarding flows using Replit Agent and Secrets.
Add Driver's License OCR to Your v0 App in 5 Minutes
Step-by-step guide to integrating the StructOCR Driver's License scanner API into a v0 by Vercel app. Build car rental and mobility onboarding flows with zero backend.
Manual TOS Entry vs. Container OCR Automation API
Analyzing the ROI and operational efficiency of replacing manual gate checkers with an automated Container OCR API in logistics yards.
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.