PDF 417 Barcode Read

Our Goal is to read Bar Codes from Drivers Licenses. All images will be coming from a URL and I convert them to a stream. BUT reader always return a null. is there something wrong with my code?


my code looks like this:

var webClient = new WebClient();
byte[] imageBytes = webClient.DownloadData(urladdress);
Stream stream = new MemoryStream(imageBytes);

Aspose.BarCode.License license = new Aspose.BarCode.License();
license.SetLicense(“Aspose.BarCode.lic”);

streambytes = stream.Length.ToString();

try
{
BarCodeReader reader = new BarCodeReader();
reader.RecognitionMode = RecognitionMode.MaxBarCodes;
reader = new BarCodeReader(stream);
while (reader.Read())
{
barcodetype = reader.GetCodeType().ToString();
barcodecontents = reader.GetCodeText().ToString();
barcodesdetected += 1;
}
reader.Close();
}
catch (Aspose.BarCode.BarCodeException ex)
{
ErrorCode = ex.Message;
}


Hi Russell,

Thank you for your inquiry.

This is to update you that the provided code snippet looks fine. We need sample input barcode images to reproduce the issue. Please forward us the input barcode images. We will investigate the issue and update you with our findings in this forum thread.

please see this an example of PDF 417 barcode.



http://3.bp.blogspot.com/-6qI47yfxQJI/Uh6KvY9_s7I/AAAAAAAAF6c/se9OVxbUeKw/s400/100_4135.jpg



Hi Russell,

Thank you for sharing sample with us.

We have evaluated the sample barcode image provided by you. It was found that barcode image has very low DPI value i.e. 96. Initial investigation shows that the issue persists. The issue has been logged into our system with ID BARCODENET-36533. Our product team will further look into it and provide feedback. We will update you with the feedback in this forum thread once available.

The main problem with this barcode consists in low resolution and high blur. The minimal sizes of start and stop pdf417 symbols are 17 and 18 pixels relatively. This barcode image has 8 pixels in the start pattern area, which connects bars one to other and makes recognition impossible.

The solution could be a scanning the barcode with 300dpi or higher resolution (300dpi is enough).

We need 300 dpi image to recognize this barcode.