Why Cropped Driver License PDF417 Barcodes Fail
Prevent cropped PDF417 failures by preserving barcode quiet zones, complete stacked rows, image orientation, and enough surrounding card context.
What the Failure Means
Cropping through the first or last barcode columns, removing complete rows, or cutting away the symbol boundary can leave too little structure for reliable recovery.
A Reliable Recovery Path
Display a landscape guide with padding around the barcode, validate the preview before upload, and do not auto-crop tightly around uncertain barcode edges. 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
- Left and right edges visible: Validate this condition before the image leaves the capture screen.
- Top and bottom rows intact: Include this check in support guidance and quality monitoring.
- Landscape orientation: 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
function showCaptureMessage(result) {
if (result?.error === "PDF417_NOT_DECODED") {
return "Retake the full license back with space around every barcode edge.";
}
return null;
}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
- •Left and right edges visible: Make this condition visible in capture guidance, validation, or review tooling.
- •Top and bottom rows intact: Make this condition visible in capture guidance, validation, or review tooling.
- •Landscape orientation: Make this condition visible in capture guidance, validation, or review tooling.
- •Padding around symbol: 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
PHP Driver License OCR SDK
Struggling with manual driver's license data entry? Our PHP OCR SDK provides AES-256 encrypted data extraction in seconds, backed by SOC 2 Type II. Upload an image for a free test!
New Hampshire Driver License OCR: Extract Fields with Python
Extract visible fields from New Hampshire driver license images into JSON. Map identifiers, names and dates, with a review workflow for incomplete results.
Iowa Driver License OCR: Extract Fields with Python
Extract visible fields from Iowa 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.
Philippines Driver License OCR with Node.js SDK
Extract structured fields from a Philippines LTO driver's license with the StructOCR Node.js SDK and TypeScript + Express.
Canada Driver License OCR with Python SDK
Extract structured fields from a Canada provincial driver licence with the StructOCR Python SDK and FastAPI.
Canada Driver License OCR with Node.js SDK
Extract structured fields from a Canada provincial driver licence with the StructOCR Node.js SDK and TypeScript + Express.
Philippines Driver License OCR with Python SDK
Extract structured fields from a Philippines LTO driver's license with the StructOCR Python SDK and FastAPI.
C# Driver's License OCR API
Upload an image for a free test! High-accuracy C# Driver's License OCR API. Get structured JSON output from images, parse PDF417 barcodes, and eliminate manual entry errors.
C# Shipping Container OCR API
Upload an image for a free test! Tutorial: Learn how to use the StructOCR C# Client to extract data from Shipping Containers. Extract ISO 6346 container numbers and check them against the ISO check digit. Includes code samples and JSON schemas.
PHP State ID Card PDF417 API Tutorial
Decode US state and Canadian provincial ID card PDF417 barcodes with PHP. Parse AAMVA fields and tell ID cards from driver licenses.
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.
Add Passport OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR Passport scanner API using the Cursor AI code editor. Build travel, hospitality, and global KYC flows rapidly.
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.