原创|使用教程|编辑:黄竹雯|2017-07-13 14:35:07.000|阅读 302 次
概述:本文将讨论如何使用Dynamsoft Barcode Reader SDK从驾驶执照中提取文本。
# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>
var barcodeImage = DWObject.GetImageURL(index, -1, -1); dbrObject.readURLAsync(barcodeImage, index, GetBarcodeInfo, OnBarcodeReadFailure); function OnBarcodeReadFailure(sImageIndex, errorCode, errorString) { console.log(errorString); } function GetBarcodeInfo(sImageIndex, result) {//This is the function called when barcode is read successfully //Retrieve barcode details var count = result.getCount(); if (count == 0) { alert("The barcode for the selected format is not found."); return; } else { for (i = 0; i < count; i++) { Barcode_text = result.get(i).text; var x = result.get(i).x1; var y = result.get(i).y1; var format = result.get(i).formatString; var barcodeText = ("barcode[" + (i + 1) + "]: " + "\n" + Barcode_text + "\n"); extractInformation(); } } }
driverLicenseFields = [ { 'abbreviation': 'DAA', 'description': 'Full Name' } , { 'abbreviation': 'DAB', 'description': 'Last Name' } , { 'abbreviation': 'DAB', 'description': 'Family Name' } , { 'abbreviation': 'DAC', 'description': 'First Name' } , { 'abbreviation': 'DAC', 'description': 'Given Name' } , { 'abbreviation': 'DAD', 'description': 'Middle Name or Initial' } , { 'abbreviation': 'DAD', 'description': 'Middle Name' } , { 'abbreviation': 'DAE', 'description': 'Name Suffix' } , { 'abbreviation': 'DAF', 'description': 'Name Prefix' } , { 'abbreviation': 'DAG', 'description': 'Mailing Street Address1' } , { 'abbreviation': 'DAH', 'description': 'Mailing Street Address2' } , { 'abbreviation': 'DAI', 'description': 'Mailing City' } , { 'abbreviation': 'DAJ', 'description': 'Mailing Jurisdiction Code' } , { 'abbreviation': 'DAK', 'description': 'Mailing Postal Code' } , { 'abbreviation': 'DAL', 'description': 'Residence Street Address1' } , { 'abbreviation': 'DAM', 'description': 'Residence Street Address2' } , { 'abbreviation': 'DAN', 'description': 'Residence City' } , { 'abbreviation': 'DAO', 'description': 'Residence Jurisdiction Code' } , { 'abbreviation': 'DAP', 'description': 'Residence Postal Code' } , { 'abbreviation': 'DAQ', 'description': 'License or ID Number' } , { 'abbreviation': 'DAR', 'description': 'License Classification Code' } , { 'abbreviation': 'DAS', 'description': 'License Restriction Code' } , { 'abbreviation': 'DAT', 'description': 'License Endorsements Code' } , { 'abbreviation': 'DAU', 'description': 'Height in FT_IN' } , { 'abbreviation': 'DAV', 'description': 'Height in CM' } , { 'abbreviation': 'DAW', 'description': 'Weight in LBS' } , { 'abbreviation': 'DAX', 'description': 'Weight in KG' } , { 'abbreviation': 'DAY', 'description': 'Eye Color' } , { 'abbreviation': 'DAZ', 'description': 'Hair Color' } , { 'abbreviation': 'DBA', 'description': 'License Expiration Date' } , { 'abbreviation': 'DBB', 'description': 'Date of Birth' } , { 'abbreviation': 'DBC', 'description': 'Sex' } , { 'abbreviation': 'DBD', 'description': 'License or ID Document Issue Date' } , { 'abbreviation': 'DBE', 'description': 'Issue Timestamp' } , { 'abbreviation': 'DBF', 'description': 'Number of Duplicates' } , { 'abbreviation': 'DBG', 'description': 'Medical Indicator Codes' } , { 'abbreviation': 'DBH', 'description': 'Organ Donor' } , { 'abbreviation': 'DBI', 'description': 'Non-Resident Indicator' } , { 'abbreviation': 'DBJ', 'description': 'Unique Customer Identifier' } , { 'abbreviation': 'DBK', 'description': 'Social Security Number' } , { 'abbreviation': 'DBL', 'description': 'Date Of Birth' } , { 'abbreviation': 'DBM', 'description': 'Social Security Number' } , { 'abbreviation': 'DBN', 'description': 'Full Name' } , { 'abbreviation': 'DBO', 'description': 'Last Name' } , { 'abbreviation': 'DBO', 'description': 'Family Name' } , { 'abbreviation': 'DBP', 'description': 'First Name' } , { 'abbreviation': 'DBP', 'description': 'Given Name' } , { 'abbreviation': 'DBQ', 'description': 'Middle Name' } , { 'abbreviation': 'DBQ', 'description': 'Middle Name or Initial' } , { 'abbreviation': 'DBR', 'description': 'Suffix' } , { 'abbreviation': 'DBS', 'description': 'Prefix' } , { 'abbreviation': 'DCA', 'description': 'Virginia Specific Class' } , { 'abbreviation': 'DCB', 'description': 'Virginia Specific Restrictions' } , { 'abbreviation': 'DCD', 'description': 'Virginia Specific Endorsements' } , { 'abbreviation': 'DCE', 'description': 'Physical Description Weight Range' } , { 'abbreviation': 'DCF', 'description': 'Document Discriminator' } , { 'abbreviation': 'DCG', 'description': 'Country territory of issuance' } , { 'abbreviation': 'DCH', 'description': 'Federal Commercial Vehicle Codes' } , { 'abbreviation': 'DCI', 'description': 'Place of birth' } , { 'abbreviation': 'DCJ', 'description': 'Audit information' } , { 'abbreviation': 'DCK', 'description': 'Inventory Control Number' } , { 'abbreviation': 'DCL', 'description': 'Race Ethnicity' } , { 'abbreviation': 'DCM', 'description': 'Standard vehicle classification' } , { 'abbreviation': 'DCN', 'description': 'Standard endorsement code' } , { 'abbreviation': 'DCO', 'description': 'Standard restriction code' } , { 'abbreviation': 'DCP', 'description': 'Jurisdiction specific vehicle classification description' } , { 'abbreviation': 'DCQ', 'description': 'Jurisdiction-specific' } , { 'abbreviation': 'DCR', 'description': 'Jurisdiction specific restriction code description' } , { 'abbreviation': 'DCS', 'description': 'Family Name' } , { 'abbreviation': 'DCS', 'description': 'Last Name' } , { 'abbreviation': 'DCT', 'description': 'Given Name' } , { 'abbreviation': 'DCT', 'description': 'First Name' } , { 'abbreviation': 'DCU', 'description': 'Suffix' } , { 'abbreviation': 'DDA', 'description': 'Compliance Type' } , { 'abbreviation': 'DDB', 'description': 'Card Revision Date' } , { 'abbreviation': 'DDC', 'description': 'HazMat Endorsement Expiry Date' } , { 'abbreviation': 'DDD', 'description': 'Limited Duration Document Indicator' } , { 'abbreviation': 'DDE', 'description': 'Family Name Truncation' } , { 'abbreviation': 'DDF', 'description': 'First Names Truncation' } , { 'abbreviation': 'DDG', 'description': 'Middle Names Truncation' } , { 'abbreviation': 'DDH', 'description': 'Under 18 Until' } , { 'abbreviation': 'DDI', 'description': 'Under 19 Until' } , { 'abbreviation': 'DDJ', 'description': 'Under 21 Until' } , { 'abbreviation': 'DDK', 'description': 'Organ Donor Indicator' } , { 'abbreviation': 'DDL', 'description': 'Veteran Indicator' } , { 'abbreviation': 'PAA', 'description': 'Permit Classification Code' } , { 'abbreviation': 'PAB', 'description': 'Permit Expiration Date' } , { 'abbreviation': 'PAC', 'description': 'Permit Identifier' } , { 'abbreviation': 'PAD', 'description': 'Permit IssueDate' } , { 'abbreviation': 'PAE', 'description': 'Permit Restriction Code' } , { 'abbreviation': 'PAF', 'description': 'Permit Endorsement Code' } , { 'abbreviation': 'ZVA', 'description': 'Court Restriction Code' } ]
试用、下载、了解更多产品信息请点击""
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@cahobeh.cn