Employee onboarding is the process of getting a new hire set up within your company's system and ready to go. This usually comes with loads of paperwork for the HR department to fill out, or even type in. I can almost guarantee you that there isn't an HR rep that enjoys inputting all of this data. What could be tedious, error-prone data entry can be done in a matter of seconds with perfect accuracy when using the LEADTOOLS Barcode SDK and the AAMVAID class
.
The back of all state-issued IDs, including driver's licenses, have a PDF417 barcode that contains the information that can be found in text on the front of the license. Instead of manually inputting this information, you can scan the barcode and retrieve the data instantly. The AAMVAID class
decodes 31 properties that enable you to grab all of the data or just specifics.
Code it!
The following code will show you how to retrieve and parse the data found in the PDF417 barcode found on ID cards that follow the AAMVA specification. These LEADTOOLS libraries are supported in NuGet, .NET, Xamarin, Java, iOS/macOS and Android. If you would rather deal with less code and zero installation, LEADTOOLS offers an AAMVA ID Recognition Web API backed by Azure.
BarcodeEngine engine = new BarcodeEngine();
BarcodeData data = engine.Reader.ReadBarcode(inputImage, LeadRect.Empty, BarcodeSymbology.PDF417);
if (data != null)
{
using (AAMVAID id = BarcodeData.ParseAAMVAData(data.GetData(), false))
{
if (id != null)
{
AAMVANameResult lastNameResult = id.LastName;
AAMVANameResult firstNameResult = id.FirstName;
Console.WriteLine($"Issuer Identification Number: {id.IssuerIdentificationNumber}");
Console.WriteLine($"Jurisdiction: {id.Jurisdiction.ToString()}");
Console.WriteLine($"AAMVA CDS Version: {id.Version.ToString()}");
Console.WriteLine($"Jurisdiction Version: {id.JurisdictionVersion}");
Console.WriteLine($"Number of Entries: {id.NumberOfEntries.ToString()}");
Console.WriteLine($"First Name: {firstNameResult.Value}");
Console.WriteLine($"Last Name: {lastNameResult.Value}");
Console.WriteLine($"Address Street 1: {id.AddressStreet1}");
Console.WriteLine($"Address Street 2: {id.AddressStreet2}");
Console.WriteLine($"Address State Abbreviation: {id.AddressStateAbbreviation}");
Console.WriteLine($"Address City: {id.AddressCity}");
Console.WriteLine($"Address Postal Code: {id.AddressPostalCode}");
Console.WriteLine($"Address Region: {id.AddressRegion}");
Console.WriteLine($"Date of Birth: {id.DateOfBirth}");
Console.WriteLine($"Over 18?: {id.Over18} ");
Console.WriteLine($"Over 19?: {id.Over19}");
Console.WriteLine($"Over 21?: {id.Over21}");
Console.WriteLine($"Expired?: {id.Expired}");
Console.WriteLine($"Expiration Date: {id.ExpirationDate}");
Console.WriteLine($"Issue Date: {id.IssueDate}");
Console.WriteLine($"ID Number: {id.IssuerIdentificationNumber}");
Console.WriteLine($"Eye Color: {id.EyeColor}");
Console.WriteLine($"Hair Color: {id.HairColor}");
Console.WriteLine($"Sex: {id.Sex}");
Console.ReadLine();
}
}
}
PDF417 on Driver's License
Results
Try for free!
To test this for yourself, you can download the latest code for free straight from our site. This trial is good for 60 days and comes with unlimited chat and email support.
Support
Need help getting this sample up and going? Contact our support team for free technical support! For pricing or licensing questions, you can contact our sales team (sales@leadtools.com) or call us at 704-332-5532.