Hello there,
we created a datamatrix barcode with Aspose.barcode in a word-document which is merged into a pdf-file.
However the Aspose.Barcode Reader Demo does not recognize our barcode, no matter how big it is. It always says 'Barcode not found, please try different symbologies'. With a smartphone-app we can read our code without any problems.
Are we doing something wrong? Could you help us?
Kind regards,
Johannes
PS: I attached our barcode in a pdf-file.
Hi Johannes,
Thanks for sharing the sample PDF file. I tested your sample document against the latest builds of Aspose.BarCode 5.6.2.0 and Aspose.Pdf 8.2.0.0. I’m sorry to share with you that I’m unable to reproduce the problem. I tried the following source code below and able to recognize this bar code image.
Document pdfDocument = new Document(@“C:\AB\test116\Barcode.pdf”);
int pageCount = pdfDocument.Pages.Count;
for (var i = 1; i <= pageCount; i++)
{
var converter = new PdfConverter();
converter.BindPdf(@"C:\AB\test116\Barcode.pdf");
converter.StartPage = i;
converter.EndPage = i;
converter.DoConvert();
MemoryStream stream = new MemoryStream();
converter.GetNextImage(stream, ImageFormat.Png);
using (BarCodeReader reader = new BarCodeReader(stream, BarCodeReadType.DataMatrix))
{
while (reader.Read())
{
Console.WriteLine("Page#" + i + " -- Symbol:" + reader.GetReadType() + " Code :" + reader.GetCodeText());
}
}
converter.Close();
converter.Dispose();
}
Result:
Page#1 – Symbol:DataMatrix Code :VST3103481#201307PRP##Schmid/Birgit/403481/108
27#1001001#08.07.2013#edc90945-7de8-e211-b2be-00155d01021d
You can download the latest builds from here:
http://www.aspose.com/community/files/51/.net-components/aspose.barcode-for-.net/default.aspx
http://www.aspose.com/community/files/51/.net-components/aspose.pdf-for-.net/default.aspx
Please let me know in case of further assistance or question.
Hi Imran,
thanks for your answer. I did not talk about the Aspose.Barcode Tool, I meant this Aspose Demo site, where you can upload an image or a document with a barcode.
We made a barcode-document for our customer and he wanted to check, if the barcode will be recognized from Aspose software, so he uploaded the pdf to the demo-site. But the demo-site did not recognize the code, however we checked it, and we got the same problem.
Johannes
Hi Johannes,
Thanks for your inquiry. I’m sorry to share with you that the online demos are working with a bit old binaries. I have logged a task to update them under ticket id SUPPORT-1730 in our issue tracking system. We’ll let you know via this forum thread once it is fixed. We’re sorry for your inconvenience.
Hi Johannes,
In addition, I would like to update you that our online demos are using a PdfExtractor class of Aspose.Pdf component. It extracts images and text from PDF document. It seems there is an issue with the PDF file as even Adobe Acrobat unable to extract images. Whereas I have shared a source code using a PdfConverter class. It converts a PDF file pages to images. Even if the demos are updated with the latest binaries, you will not be able to recognize this bar code from the PDF file. In order to cater for this scenario, I have added my comments in our internal issue tracking system. It is to add a radio button so far our clients can try both options.