

Using (RasterImage image = RasterImage.Create(,, 24, resolution, PDF417BarcodeData barcodeData = (PDF417BarcodeData)BarcodeData.CreateDefaultBarcodeData(BarcodeSymbology.PDF417) Ĭonst int resolution = 96 // screen resolutionĮ(LeadRect.Empty, Default quiet zone for PDF417 is 2 * XModule 4:1 looks similar to ID barcodes in the wild WriteOptions.ECCLevel = PDF417BarcodeECCLevel.Level5 Error level must be at least 3, 5 is recommended Refer to AAMVA CDS 2016 Section D.3 thru D.11.2 PDF417BarcodeWriteOptions writeOptions = (PDF417BarcodeWriteOptions)(BarcodeSymbology.PDF417)

In this simple case, we simply created a blank image using the calculated bounds of the barcode: BarcodeEngine engine = new BarcodeEngine() Here we generate the BarcodeEngine, set a few options to help the proportions make AAMVA happy, and LEADTOOLS takes care of the rest. Thanks to LEAD’s nearly three decades of experience in with raster and document imaging technologies, this process is even simpler than writing the AAMVA string despite the barcode’s greater complexity. Now that our customer’s information is correctly encoded for AAMVA, we will create the PDF417 barcode. an ID)īuilder.SetSubfileType(0, AAMVASubfileType.DL, "DL") īuilder.AddDataElementToSubfile(0, "DAC", "John") īuilder.AddDataElementToSubfile(0, "DCS", "Doe") Build the subfile entry as a driver's license (vs. Here we initialize the AAMVAIDBuilder, add some information and then use the Build function to generate the AAMVAID object: AAMVAIDBuilder builder = new AAMVAIDBuilder() īuilder.SetJurisdiction(AAMVAJurisdiction.NorthCarolina, AAMVAID.LookupIssuerIdentificationNumber(AAMVAJurisdiction.NorthCarolina)) īuilder.SetVersion(AAMVAVersion.Version2016) The builder will help organize the data and output it conforming to the 2016 AAMVA CDS. To aid in this process, LEADTOOLS provides the AAMVAIDBuilder class. LEADTOOLS simplifies this in two ways: generating the AAMVA string and creating the PDF417 barcode.įirst, you need to convert your customer data into a valid AAMVA string value. As with most specifications, they are hard to follow and can cause a significant development roadblock due to the R&D requirements. Naturally, you can’t just print any old barcode onto licenses and IDs. There may be fewer reasons for generating AAMVA barcodes, but every motor vehicle agency in every state or province in the United States, Canada, and Mexico needs the ability to print them on the licenses they issue. Where’s the name? Or the birthdate? Do you need to calculate if this person is over 21 and legally allowed to make a purchase? With LEADTOOLS, you can get that kind of information in beautiful, strongly typed properties: using (AAMVAID id = BarcodeData.ParseAAMVAData(data.GetData(), false))Ĭonsole.WriteLine("Issuer Identification Number: " + id.IssuerIdentificationNumber) Ĭonsole.WriteLine("First Name: " + id.FirstName.Value) Ĭonsole.WriteLine("Last Name: " + id.LastName.Value) Ĭonsole.WriteLine("Over 21?: " + id.Over21) Since then, LEADTOOLS has added a new AAMVAID class which does all the field parsing for you. That paper also discussed using the PDF417 barcodes before they were regulated by AAMVA. We covered those concepts in an earlier white paper on Capturing Customer Information from Driver’s Licenses, so we won’t repeat them here. Since Driver’s Licenses are so broadly accepted as forms of identification, there are a wealth of opportunities for reading the information from them. This tutorial will introduce you to the classes and methods for both reading and writing AAMVA-compliant barcodes from Driver’s Licenses. These barcodes are small, error resistant, and can encode a lot of information. Thankfully, new driver’s licenses also have PDF417 barcodes on them, and in North America, follow specifications laid out by the American Association of Motor Vehicle Administrators (AAMVA). The unfortunate side-effect from that positive change is that traditional recognition algorithms are more difficult with the many colors, backgrounds, holograms, and layouts. Many governing bodies have made significant strides towards making forgery more difficult. If you’ve renewed your driver’s license any time in the last few years, you have likely noticed an increase in its visual complexity.
