Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, January 19, 2018 4:00:06 PM(UTC)
Nick Villalobos

Groups: Registered
Posts: 119

Was thanked: 4 time(s) in 4 post(s)

This is a .NET Core project that is referencing the Leadtools.Barcode Nuget and will read the data from the PDF417 barcode that is located on the back of North American driver’s licenses. This is using the AAMVAID Class. Reading this barcode can return twenty-nine properties from the class and you can see those from the link below:
https://www.leadtools.co...aamvaid--properties.html

File Attachment(s):
Final-BarcodeSample.zip (233kb) downloaded 401 time(s).

Edited by moderator Wednesday, December 5, 2018 11:49:20 AM(UTC)  | Reason: Updating Nuget

Nick Villalobos
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, February 13, 2020 3:41:31 PM(UTC)
Christopher

Groups: Registered, Tech Support, Administrators
Posts: 89

Was thanked: 4 time(s) in 4 post(s)

The following is a sample PDF417 Reader example project.
Unlike the previous C# example project, this is written in VB.NET and does not use NuGet packages.

VB.NET
Code:
Dim inputFilePath As String = "C:\Users\Public\Documents\LEADTOOLS Images\license_sample_rear_aamva.png"

      Using Codecs As RasterCodecs = New RasterCodecs
         Using inputImage As RasterImage = Codecs.Load(inputFilePath)


            Dim engine As BarcodeEngine = New BarcodeEngine()
            Dim data As BarcodeData = engine.Reader.ReadBarcode(inputImage, LeadRect.Empty, BarcodeSymbology.PDF417)

            If (data IsNot Nothing) Then

               Using id As AAMVAID = BarcodeData.ParseAAMVAData(data.GetData, False)

                  If (id IsNot Nothing) Then

                     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())

                     Dim firstNameResult As AAMVANameResult = id.FirstName
                     If (firstNameResult IsNot Nothing) Then
                        Console.WriteLine("First Name: " + firstNameResult.Value.ToString()) '+ ", Inferred?: " + firstNameResult.InferredFromFullName)
                     End If

                     Dim lastNameResult As AAMVANameResult = id.LastName
                     If (lastNameResult IsNot Nothing) Then
                        Console.WriteLine("Last Name: " + lastNameResult.Value.ToString()) ' + ", Inferred?: " + lastNameResult.InferredFromFullName)
                     End If

                     Dim addressStreet1 As String = id.AddressStreet1
                     If (addressStreet1 IsNot Nothing) Then
                        Console.WriteLine("Address Street 1: " + addressStreet1)
                     End If

                     Dim addressStreet2 As String = id.AddressStreet2
                     If (addressStreet2 IsNot Nothing) Then
                        Console.WriteLine("Address Street 2: " + addressStreet2)
                     End If


                     Dim addressStateAbbreviation As String = id.AddressStateAbbreviation
                     If (addressStateAbbreviation IsNot Nothing) Then
                        Console.WriteLine("Address State Abbreviation: " + addressStateAbbreviation)
                     End If

                     Dim addressCity As String = id.AddressCity
                     If (addressCity IsNot Nothing) Then
                        Console.WriteLine("Address City: " + addressCity)
                     End If


                     Dim addressPostalCode As String = id.AddressPostalCode
                     If (addressPostalCode IsNot Nothing) Then
                        Console.WriteLine("Address Postal Code: " + addressPostalCode)
                     End If

                     Dim addressRegion As AAMVARegion = id.AddressRegion
                     Console.WriteLine("Address Region: " + addressRegion.ToString())

                     Dim dateOfBirth As String = id.DateOfBirth
                     If (dateOfBirth IsNot Nothing) Then
                        Console.WriteLine("Date of Birth: " + dateOfBirth)
                     End If

                     If (id.Over18Available) Then
                        Console.WriteLine("Over 18?: " + id.Over18.ToString())
                     End If


                     If (id.Over19Available) Then
                        Console.WriteLine("Over 19?: " + id.Over19.ToString())
                     End If


                     If (id.Over21Available) Then
                        Console.WriteLine("Over 21?: " + id.Over21.ToString())
                     End If


                     If (id.ExpirationAvailable) Then
                        Console.WriteLine("Expired?: " + id.Expired.ToString())
                     End If

                     Dim expirationDate As String = id.ExpirationDate
                     If (expirationDate IsNot Nothing) Then
                        Console.WriteLine("Expiration Date: " + expirationDate)
                     End If

                     Dim issueDate As String = id.IssueDate
                     If (issueDate IsNot Nothing) Then
                        Console.WriteLine("Issue Date: " + issueDate)
                     End If

                     Dim idNumber As String = id.Number
                     If (idNumber IsNot Nothing) Then
                        Console.WriteLine("ID Number: " + idNumber)
                     End If

                     Dim eyeColor As AAMVAEyeColor = id.EyeColor
                     Console.WriteLine("Eye Color: " + eyeColor.ToString())

                     Dim hairColor As AAMVAHairColor = id.HairColor
                     Console.WriteLine("Hair Color: " + hairColor.ToString())

                     Dim sex As AAMVASex = id.Sex
                     Console.WriteLine("Sex: " + sex.ToString())
                     Console.ReadLine()

                  End If
               End Using
            End If
         End Using
      End Using


File Attachment(s):
simplePDF417ReaderVB_v20.zip (394kb) downloaded 136 time(s).
Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.057 seconds.