Ikram ul Haq October 8, 20150 Comments

Handle Exceptions with Aspose.OCR for Java 2.8.0

Handle Exceptions with Aspose.OCR for Java 2.8.0

October 8, 2015
Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.OCR for Java logo We are pleased to announce that Aspose.OCR for Java 2.8.0 is now available for public use. This release includes exception handling to capture failures caused by the OmrEngine and getting correct multi selected values from Grid element.

Handling Exceptions for OmrEngine

This release of the Aspose.OCR for Java API has exposed com.aspose.omr.OmrException class along with it’s supporting methods that allow you to handle exceptions caused by OmrEngine during the processing of OMR forms.

Simple usage scenario of OmrException class is as follow


//Enclose your code in a try catch structure
try
{
     //Create an instance of OmrTemplate and load the .amr file
     OmrTemplate template = OmrTemplate.load("template1.amr");

     //Create an instance of OmrImage and load the scanned form
     OmrImage image = OmrImage.load("image1.png");

     //Create an instance of OmrEngine and initialize it with OmrTemplate
     OmrEngine engine = new OmrEngine(template);

     //Process the OMR form
     OmrProcessingResult result = engine.extractData(new OmrImage[]{image});
}
//Handle exceptions
catch (OmrException e)
{
    e.printStackTrace();
}
catch (IOException e)
{
    e.printStackTrace();
}

Enhancements

This release has incorporated some enhancements. The list of enhancements is given below:

  • Fixed: Getting multi selected values from Grid element.
  • Fixed: Incorrect recognized text for specific file.
  • Fixed: OCR Engine hangs while performing OCR on Image of 2479 X 3508 with graphics.
  • Fixed: Arithmetic operation resulted in an overflow.

Please review the release notes of Aspose.OCR for Java 2.8.0 for a complete view of new features & enhancements. If you are planning to upgrade the API from any previous version, we strongly suggest you to check the Public API Changes section to know what has been changed since your current revision of the API.

Aspose.OCR for Java Resources

The resources, you may need to accomplish your tasks:

As always, we appreciate your feedback so if you ever have anything to tell us about this release or anything else, please head to the Aspose.OCR forum for a chat.

Leave a comment

Posted inAspose.Total Product Family, Aspose.OCR Product Family
 

Related Articles