OMR Templates are readable with Optical Mark Recognition (OMR) software or APIs. OMR software reads the information marked/ filled by people on surveys, tests, and other paper documents. We can easily generate OMR surveys, quizzes, or answer sheets from text markups programmatically. In this article, we will learn how to create an OMR Survey or Answer Sheet in Java.
The following topics shall be covered in this article:
- Java API to Create OMR Survey or Answer Sheet
- Create OMR Survey Form from Text Markup
- Create OMR Test from Text Markup
- Generate Answer Sheet from Text Markup
Java API to Create OMR Survey or Answer Sheet
For creating OMR templates from text markups, we will be using the Aspose.OMR for Java API. It allows designing, creating, and recognizing answer sheets, tests, MCQ papers, quizzes, feedback forms, surveys, and ballots. Please either download the JAR of the API or add the following pom.xml configuration in a Maven-based Java application.
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>http://repository.aspose.com/repo/</url>
</repository>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-omr</artifactId>
<version>19.12</version>
</dependency>
Create OMR Survey Form from Text Markup using Java
We can create a survey form from text markup by following the steps given below:
- Firstly, create an instance of the OmrEngine class.
- Next, call the GenerateTemplate method with text markup file path as an argument.
- After that, get results as an object of the GenerationResult class.
- Finally, call the Save method to save template images and OMR templates. It takes the path of the local disk folder and the name of the template as arguments.
The following code example demonstrates how to create an OMR survey template from text markup using Java.
We have used the following text markup in the code example mentioned above.
Create OMR Test from Text Markup using Java
We can create a quiz or a test by following the steps mentioned earlier. However, we just need to use the following text markup for this purpose.
Generate OMR Answer Sheet from Text Markup using Java
We can create a ready-to-print OMR answer sheet by following the steps mentioned earlier. However, we just need to use the following text markup for this purpose.
Get a Free License
You can get a free temporary license to try the library without evaluation limitations.
Conclusion
In this article, we have learned how to create an OMR survey template from text markup and generate survey images. We have also seen how to generate a quiz and an answer sheet from text markup programmatically. Besides, you can learn more about Aspose.OMR for Java API using the documentation. In case of any ambiguity, please feel free to contact us on forum.