Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/c0shea/idparser
Parses PDF417 AAMVA-compliant driver's licenses and ID cards
https://github.com/c0shea/idparser
aamva-standard drivers-license net parse state-id
Last synced: 12 days ago
JSON representation
Parses PDF417 AAMVA-compliant driver's licenses and ID cards
- Host: GitHub
- URL: https://github.com/c0shea/idparser
- Owner: c0shea
- License: mit
- Created: 2016-09-23T03:09:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-26T01:38:51.000Z (about 1 year ago)
- Last Synced: 2024-10-12T06:46:32.167Z (27 days ago)
- Topics: aamva-standard, drivers-license, net, parse, state-id
- Language: C#
- Homepage:
- Size: 735 KB
- Stars: 94
- Watchers: 20
- Forks: 37
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ID Parser
![Build Status](https://coshea.visualstudio.com/_apis/public/build/definitions/51c35e17-5e8a-4b8a-8c23-dabefcc52c57/5/badge)
ID Parser can be used to parse AAMVA-compliant driver's licenses and ID cards into objects that you can
work with. More information on the versions of the AAMVA standard can be found [here](http://www.aamva.org/DL-ID-Card-Design-Standard/).
More information on the D20 Data Dictionary can be found [here](https://www.aamva.org/D20/).## Usage
1. Include the using
```cs
using IdParser;
```2. Then you're off to the races!
```cs
var idCard = Barcode.Parse(barcode);
Console.WriteLine(idCard.Address.StreetLine1); // "123 NORTH STATE ST."
Console.WriteLine(idCard.IssuerIdentificationNumber.GetDescription()); // "New York"if (idCard is DriversLicense license)
{
Console.WriteLine(license.Jurisdiction.VehicleClass); // "C"
}
```### More Examples
Take a look at the unit test project for more examples and usage.
## Client
The ```IdParser.Client``` project is a handy GUI application to help test and verify that an ID
will be parsed correctly. The app works with both OPOS and HID keyboard emulation scanners.![](https://raw.githubusercontent.com/c0shea/IdParser/master/IdParser.Client.png)
## FAQ
* **I can't build ```IdParser.Client```. It's missing a required dependency.**
You need to have [Microsoft POS for .NET](https://www.microsoft.com/en-us/download/details.aspx?id=55758&WT.mc_id=rss_alldownloads_all)
installed. The ```Microsoft.PointOfService``` dll is GAC'd and will allow you to build and run
the client app.* **The ```Height``` class has the wrong ```TotalInches``` or ```Centimeters```.**
The AAMVA standard has no decimal places in the height subfile record.
As a result, the conversion between inches and centimeters will be off.* **The library is throwing `ArgumentExcpetions` for every barcode I'm passing in.**
By default, all barcodes are parsed using the `Strict` validation level. All barcodes are expected to
adhere exactly to the AAMVA standard as defined in the PDFs for parsing to succeed. This is the
recommended level for scanners using OPOS. However, if HID keyboard emulation is used, especially when
scanning using a web browser, the expected data can become malformed. You can try using the `None`
validation level, however this is not guaranteed to work in all cases. Data elements may be skipped
and exceptions may still be thrown.## Find IDs Not in Tests Regex
```regex
DAJ(?!(AL|AR|AZ|AK|CA|CO|CT|DE|FL|GA|HI|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|MS|MT|NC|ND|NH|NJ|NM|NV|NY|OH|ON|OR|PA|PE|PR|RI|SC|TN|TX|UT|VA|VT|WA|WI|WV|QC|OK|NS|NE|NB|AB|SD|DC))[A-Z]+
```