We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to recognize pdf417 barcodes from PDF

I have a pdf that has multiple pdf417's on the page. I'm converting the pdf page in question to an image before attempting to look for the barcodes. In the past we've used other barcode software to recognize the barcodes, but it doesn't work with aspose. I am using the latest code to date to analyze the barcodes. I've also tried messing around with the resolution going as high as 300, but we shouldn't have to go high because it takes a very long time the higher you go per page, and if the document has 10 pages in it then it will take forever. Also, the first big barcode is encrypted data, but the smaller second one should be "B6EB40984BF4"

I've included the pdf page, and the code. If i'm doing something wrong please let me know.

Dim ms As New MemoryStream(io.file.readallbytes("c:\onepage.pdf"))

Dim PageNumber As Integer = 1
Dim pages As Integer() = {PageNumber}

Dim licp As New Aspose.Pdf.License
licp.SetLicense("Aspose.Total.lic")

Dim convertor As New PdfConverter
convertor.BindPdf(ms)
convertor.StartPage = PageNumber
convertor.EndPage = PageNumber
convertor.Resolution = New Aspose.Pdf.Devices.Resolution(72)
convertor.DoConvert()

Dim lic As New Aspose.BarCodeRecognition.License
lic.SetLicense("Aspose.Total.lic")

While convertor.HasNextImage
Dim imagestream As New MemoryStream
convertor.GetNextImage(imagestream, System.Drawing.Imaging.ImageFormat.Png)
imagestream.Position = 0

Dim br As New BarCodeReader(imagestream, BarCodeReadType.Pdf417)

While br.Read()
results += br.GetCodeText() & IIf(results.Length > 0, "///", "")
End While

imagestream.Close()
br.Close()

End While

ms.Close()

Hi Darcy,


Please accept our apologies for the delay. We are working over your query and will get back to you as soon as possible.

Hi Darcy,

Thank you for your inquiry. The ideal resolution for recognition purposes is 300dpi and more. If the image has lower resolution then you may lead to scan failure. Anyways, I've logged an investigation as BARCODENET-33402 in our issue tracking system. As soon as we have made some significant progress, we would be more than happy to update you with the status of correction. We are sorry for this inconvenience.

Thanks for your reply. We've also used keepdynamic barcode recognition .net software recently, it is significantly faster, and it was able to read the barcodes with a resolution of 110. We want to avoid high resolutions because the higher we go the more resources and memory they require.

Hi Darcy,

Thank you for these details. We can understand your needs. Our development team has started to analyze the actual cause. We will keep you informed and let you know once it is fixed and available for public use.

Hi Darcy,


We have a good news for you is BARCODENET-33402 has now been resolved and its fix will be included in the next version of Aspose.BarCode for .NET (5.7.0). Which is expected after 2 or 3 weeks. We will inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as BARCODENET-33402) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.