Hi,
We do barcode recognition for code 39, and sometimes we get barcodes back that contain the following string:
- SDAIBCFAR3P
- PBAIBCFAR3P
- TQQDBCFAR3P
So, it seems there is a repeating pattern here, being BCFAR3P that indicates the barcode could not be read.
However, when I read these barcodes with e.g. QR Code Reader App on my smartphone, that App is perfectly capable of reading the correct value.
So, is this a bug in the software?
Or do we need to add some extra parameters to recognize the barcode?
We are using version 22.9.0.
The attached word document contains some barcodes that were not read correct, and the attached PDF, the first page is correctly read, but the second is not.
25279650-001.pdf (2.3 MB)
Best regards,
Geert.Barcodes.docx (291.5 KB)
@Geert_De_Grauwe,
Thanks for the sample documents.
Please notice, after an initial test, I am able to reproduce the issue as you mentioned by using the sample documents. For example, I found some barcodes are not read correctly from PDF document using the following sample code:
e.g.
Sample code:
string filename = "e:\\test2\\25279650-001.pdf";
Aspose.Pdf.Document pdfDoc = new Aspose.Pdf.Document(filename);
Aspose.Pdf.Facades.PdfConverter pdfConverter = new Aspose.Pdf.Facades.PdfConverter(pdfDoc);
pdfConverter.RenderingOptions.BarcodeOptimization = true;
//set resolution to the page
//300 dpi is standard resolution
pdfConverter.Resolution = new Aspose.Pdf.Devices.Resolution(300);
//set all pages to render into images
pdfConverter.StartPage = 1;//starts from 1
pdfConverter.EndPage = pdfConverter.Document.Pages.Count;
//render selected pages to the images
pdfConverter.DoConvert();
while (pdfConverter.HasNextImage())
{
//render current page to memory stream as png image
MemoryStream imageStream = new MemoryStream();
pdfConverter.GetNextImage(imageStream, ImageFormat.Png);
imageStream.Position = 0;
// Recognize the barcode from the image stream above
using (Aspose.BarCode.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader(imageStream, Aspose.BarCode.BarCodeRecognition.DecodeType.AllSupportedTypes))
{
Console.WriteLine(reader.ReadBarCodes().Length);
foreach (Aspose.BarCode.BarCodeRecognition.BarCodeResult barcodeResult in reader.ReadBarCodes())
{
Console.WriteLine("Codetext found: " + barcodeResult.CodeType + ", Symbology: " + barcodeResult.CodeText);
}
}
}
output:
Codetext found: Code39Standard, Symbology: GV10789077
Codetext found: Code39Standard, Symbology: SDAIBCFAR3P --> this seems incorrect.
I have logged a ticket with an id “BARCODENET-38402” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.
Hi, Any idea when we will have an update or fix for this issue?
@Geert_De_Grauwe,
Hopefully, your issue would be fixed in the first quarter of 2023. Anyways, we will also check if we could provide you (exact) latest updates on your issue. Once we have new information available, we will update you here.
Has this issue been solved in the meanwhile?
@EffectServiceDesk,
No, the issue (logged earlier as “BARCODENET-38402”) is not resolved yet. Initially, it was planned to fix in Q1 2023 but somehow ETA is changed and we cannot fix it in near future.
We are sorry for any inconvenience caused!
@EffectServiceDesk, @Geert_De_Grauwe,
This is to inform you that the issue (Ticket ID: “BARCODENET-38402”) has been resolved. The fix/enhancement will be included in one of our upcoming releases (Aspose.BarCode v24.11/v24.12) that we plan to release in the November/December 2024. You will be notified when the fixed version is released.