BarcodeRecognition PDF 417

Hi, I have a problem with barcode pdf 417 reader on drivers license. When I am trying to read from it. Response has extra strings like
DCB, DCD, DCS etc. embedded along with the data.

How can we get rid of these strings?

I am using full license.

This is code:
Byte[] bitmapData = Convert.FromBase64String(dlbackstring);
MemoryStream streamBitmap = new MemoryStream(bitmapData);
Bitmap bitImage = new Bitmap((Bitmap)Image.FromStream(streamBitmap));

            // Initialize the BarCodeReader 
            BarCodeReader reader = new BarCodeReader(bitImage, BarCodeReadType.Pdf417);

            // Call Read() method in a loop
            while (reader.Read())
            {
                dlbackdesc.Append(reader.GetCodeText());
            }


            reader.Close();

Output I am receiving from reading barcode:

@\n\u001e\rANSI 636014040002DL00410299ZC03400042DLDCAC\nDCB01\nDCDNONE\nDBA10092022\nDCSJONNALA\nDACGREG \nDADWASMUTH \nDBD08182017\nDBB10091990\nDBC1\nDAYBLK\nDAU066 IN\nDAG21641 CANADA RD\nDAILAKE FOREST\nDAJCA\nDAK926300000 \nDAQE1218956\nDCF08/11/2008507RB/DDFD/22\nDCGUSA\nDDEU\nDDFU\nDDGU\nDAW165\nDAZBLK\nDCK17237E21043440401\nDDB04162010\nDDD0\n\rZCZCA\nZCBCORR LENS\nZCCBLK\nZCDBLK\nZCE\nZCF\n\r

Attached PDF 417 image:
license_back.JPG (949.3 KB)

Thanks

@mfiroved,

We have tried to reproduce the issue. Initial investigation shows that the issue persists. The issue has been logged into our system with ID BARCODENET-36742 for further investigation. We will update you here once there is some information or a fix version available in this regard.

@mfiroved,

We have further investigated the issue in detail. It was found that there is no issue with the Aspose.BarCode functionality. The data in the driver license has a particular format and it depends from country to country and state to state. For this particular format we have devised a parser. Parser code file is attached for your reference. You may use the parser along with following code snippet to read barcode from license file shared by you.

BARCODENET-36742.zip (945.7 KB)

CODE:

DriverLicense driverLicense = new DriverLicense("license_back.JPG"); 
string json = driverLicense.ToJson();
Console.Write(json);

OUTPUT:

{
“Header”: {
“Indicator”: “@”,
“DataSeparator”: “\n”,
“RecordSeparator”: “\u001e”,
“SegmentSeparator”: “\r”,
“FileType”: "ANSI ",
“IssuerIdentificationNumber”: “636014”,
“AAMVAVersionNumber”: “04”,
“JurisdictionVersionNumber”: “00”,
“NumberOfEntries”: 2
},
“SubfileDesignators”: [
{
“SubfileType”: “DL”,
“Offset”: 41,
“Length”: 299
},
{
“SubfileType”: “ZC”,
“Offset”: 340,
“Length”: 42
}
],
“DataElements”: [
{
“Data”: {
“DLD”: “CAC”,
“DCB”: “01”,
“DCD”: “NONE”,
“DBA”: “10092022”,
“DCS”: “JONNALA”,
“DAC”: “BALA”,
“DAD”: “SANTOSH RAGHU SHARAN”,
“DBD”: “08182017”,
“DBB”: “10091985”,
“DBC”: “1”,
“DAY”: “BLK”,
“DAU”: “066 IN”,
“DAG”: “21641 CANADA RD APT 16L”,
“DAI”: “LAKE FOREST”,
“DAJ”: “CA”,
“DAK”: "926300000 ",
“DAQ”: “E2104344”,
“DCF”: “08/11/2008507RB/DDFD/22”,
“DCG”: “USA”,
“DDE”: “U”,
“DDF”: “U”,
“DDG”: “U”,
“DAW”: “165”,
“DAZ”: “BLK”,
“DCK”: “17237E21043440401”,
“DDB”: “04162010”,
“DDD”: “0”
}
},
{
“Data”: {
“ZCZ”: “CA”,
“ZCB”: “CORR LENS”,
“ZCC”: “BLK”,
“ZCD”: “BLK”,
“ZCE”: “”,
“ZCF”: “”
}
}
]
}