We’re pleased to announce the release of Aspose.OCR for Java 2.5.0. In this version, you will find Improved OCR engine performance, improved Barcode element recognition process and how to create OMR templates dynamically & efficiently. Please review the release notes of Aspose.OCR for Java 2.5.0 for a complete list of enhancements. If you are planning to upgrade the API from previous revision, go ahead as there is no change in the API. For those who are planning to upgrade the API from version Aspose.OCR 2.0.0, may visit our documentation article Migrating from Earlier Versions of Aspose.OCR.
How to dynamically create OMR Template
In addition to OMR Template Editor application used to create the templates, developers can also dynamically create templates using the code. As an example, let us create an OMR template with a ChoiceBox element having four values.
- Create an empty template using the OmrTemplate class:
OmrTemplate template = new OmrTemplate();
- Access the default page by specifying its Height
OmrPage page = template.getPages().getItem(0);
Note: By default the template has one page in page collection. Every page has its dimensions. You can set dimensions through Width and Height properties of the OmrPage class.
- Set the position & diementions of the element:
java.awt.geom.Point2D.Float choiceBoxPosition = new java.awt.geom.Point2D.Float(20, 5);
// 20 mm to the right, 5 mm from the top
Dimension choiceBoxSize = new Dimension(12, 24);
- Create ChoiceBox element:
ChoiceBoxElement choiceBox = new ChoiceBoxElement(“AnotherElement”, choiceBoxPosition, choiceBoxSize);
- Set the element orientation:
Note: The values of the choiceBox element can be oriented as horizontally or vertically.
- Set the four values of the choiceBox:
Note: The values can be set as (1,2,3,4) or (A,B,C,D).
- Save the Template:
Enhancements & Fixes
This release has addressed a few critical issues and has incorporated some enhancements. The details are given below:
- Enhanced the OCR Engine performance.
- Improved the BarCode element recognition process.
- Dynamically create OMR templates without any issue.
Aspose.OCR for Java Resources
The resources, you may need to accomplish your tasks:
- Home page for Aspose.OCR for Java API.
- Download Aspose.OCR for Java.
- Aspose.OCR for Java online documentation – help documentation and API reference documents.
- Aspose.OCR Product Family Forum – post your technical questions and queries, or any other problem you are facing while working with Aspose.OCR APIs.
- Enable blog Subscription – Do not limit yourself, you can keep yourself updated with the latest news on Aspose.OCR APIs, new features, fixes and other API related topics by subscribing to Aspose.OCR blog.
- Aspose.OCR for Java Examples – We have published our code examples on the social coding website GitHub.com. Anyone could explore the code examples for learning purposes.
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.