Get barcode information using Aspose.BarCode in .NET

Hi,


In 3.8 version of Aspose.Barcode library, there was a class by name Aspose.BarCode.BarCodeInfo which we were using in C# project code. Now we upgraded Aspose to 6.9 version and this class is not available. Where can I find the alternative class and its properties/methods?

Thanks,

Hi,


First of all, please accept my apology for not replying earlier.

Please note that there is no such class as Aspose.BarCode.BarCodeInfo in the latest version of Aspose.BarCode library. To know what your specified class is used for, I have downloaded and installed the v3.8 of Aspose.BarCode for .NET. I am afraid, I am unable to find it via Visual Studio’s Intellisense. I have also checked the XML and CHM documentation for any such references, but there aren’t any.

Could you please confirm the release version or provide us the assembly for our review? Once we have ample knowledge of Aspose.BarCode.BarCodeInfo class, we will be able to provide you an alternative with some future release of Aspose.BarCode for .NET.

Thank you for your understanding and cooperation.

Thanks for the reply. I have attached a zip file which contains Aspo.BarCode.dll & its xml file. Sorry, the version is 3.0.0.0 and not 3.8.


We use the code like this.

Aspose.BarCode.BarCodeReader reader = new Aspose.BarCode.BarCodeReader(bmp);
Aspose.BarCode.BarCodeInfo[] bars = reader.Read();

And then from the bars collection, we use the following properties of BarCodeInfo class:
BarCodeReadType, BoundingRectangle, ChecksumPosition, CodeBytes, EndPoints, HasSupplement, MacroPDFFileID, MacroPDFLastSegment, MacroPDFSegmentIndex

From the analysis I did with latest Aspose(ver 4.7), I find a new library Aspose.BarCodeRecognition and the BarCodeReader is moved to this library from Aspose.BarCode.dll. The Read method doesn’t return BarCodeInfo collection, instead it returns a boolean.

If you can let me know how to get the above features it would be of great help.

Thanks,
ACS

Hi,


Thank you for the clarification.

I believe the following methods from the latest version of Aspose.BarCode for .NET will provide you the equivalent information as of BarCodeInfo class from v3.0.0.
  • BarCodeReader.GetMacroPdf417FileID()
  • BarCodeReader.GetMacroPdf417SegmentID()
  • BarCodeReader.GetMacroPdf417LastSegment()
  • BarCodeReader.GetReadType()
  • BarCodeReader.GetCodeBytes()
  • BarCodeReader.GetRegion()
I am afraid, there are no properties/methods available that can provide the information for the following,
  • EndPoints
  • HasSupplement
Please check the below sample source for your reference,

C#
var builder = new Aspose.BarCode.BarCodeBuilder(“1234567890”, Aspose.BarCode.Symbology.MacroPdf417);
var bitmap = builder.GenerateBarCodeImage();
var reader = new Aspose.BarCodeRecognition.BarCodeReader(bitmap, Aspose.BarCodeRecognition.BarCodeReadType.AllSupportedTypes);
if (reader.Read())
{
var fileId = reader.GetMacroPdf417FileID();
var segId = reader.GetMacroPdf417SegmentID();
var lastSeg = reader.GetMacroPdf417LastSegment();
var region = reader.GetRegion();
var readType = reader.GetReadType();
var orientation = reader.GetBarCodeOrientation();
var codeByte = reader.GetCodeBytes();
}

In case you have further inquiries or comments, please feel free to write back.
Regards,