Recognize BarCodes using new Decode Types in Aspose.BarCode for Java

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

We are pleased to announce the release of Aspose.BarCode for Java 18.11. This release added new Decode Types in the API for better recognition of Barcodes. Enums names have also been changed to bring them in line with Java naming conventions. For a detailed note on what is new and fixed, please visit the release notes page of API documentation.

New subsets added to DecodeType

The new release of Aspose.Barcode provides additional Decode types which enhance the performance and ease of reading barcodes. You may use the newly added Decode types as shown below.

BarCodeReader reader = new BarCodeReader(folder + "Code11.png", 
DecodeType.TYPES_1D);
while (reader.read())
{
String codeType = reader.getCodeType().toString();
String codeText = reader.getCodeText();
System.out.println(codeType + ", " + codeText);
}
result: Code11, 012345

BarCodeReader reader = new BarCodeReader(folder + "Postnet.png",
DecodeType.POSTAL_TYPES);
while (reader.read())
{
String codeType = reader.getCodeType().toString();
String codeText = reader.getCodeText();
System.out.println(codeType + ", " + codeText);
}
result: Postnet, 012345

BarCodeReader reader = new BarCodeReader(folder + "GS1Code128",
DecodeType.MOST_COMMON_TYPES);
while (reader.read())
{
String codeType = reader.getCodeType().toString();
String codeText = reader.getCodeText();
System.out.println(codeType + ", " + codeText);
}
result : GS1Code128, 012345

Other Enhancements made to the API

Other than the addition of decode types, there are a number of other enhancements made to the API in this release. These enhancements are listed below:

  • Enum names have been renamed to match Java naming conventions.
  • Barcode reader has been enhanced with improved detection of the following barcodes
    • 3D-distorted barcodes
    • 2D-rotated barcodes
    • CODE39 barcodes
  • GS1 DataBar Expanded Stacked barcode passes the GS1 Canada barcode verification.
  • You can now constrain the region for barcode detection to improve performance.
  • Enhanced MicrE13B for safe bitmap access.
  • Generate Databar Extended Stacked Barcode with 7 rows.
  • Implemented license setting with Open JDK 11
  • Improved API performance.

Aspose.BarCode for Java Resources

The following API resources can be of help to you in getting started with Aspose.BarCode: