Browse our Products

Aspose.OMR for .NET 23.6.1 - Release Notes

Deprecation warning

What was changed

KeySummaryCategory
OMRNET‑594Added support for Urdu, Hebrew and Bengali writing and number systems.New feature
OMRNET‑850Added the ability to save a multi-page printable form to a single PDF file.New feature
OMRNET‑850Added a unified recognition API for single-page and multi-page forms.New feature
OMRNET‑697Added the ability to synchronize the height of all blocks in the container.New feature
OMRNET‑850Added the ability to recognize a completed form scanned as a multi-page PDF document.Fix

Known issues and limitations

KeySummaryWorkaround
OMRNET‑850Recognition of multi-page TIFF images causes an error.Scan each page of the filled form into a separate TIFF file and recognize them one-by-one.
OMRNET‑555Recalculate method results in incorrect processing of ScoreGroup elements (text markup / JSON markup) and CustomAnswerSheet elements (text markup / JSON markup).Use RecognizeImage method with different threshold setting instead of run-time adjustments of recognition accuracy.
n/aWhen choosing the Bengali writing system, characters are written from right to left.To be fixed in the next version. For now, you can use the Western writing system and manually specify localized numerals.

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OMR for .NET 23.6.1 that may affect the code of existing applications.

Added public APIs:

The following public APIs have been added to Aspose.OMR for .NET 23.6.1:

Aspose.OMR.Api.TemplateProcessor.Recognize method

A unified recognition method that allows you to read the completed form from one respondent, regardless of the file format or number of pages. It replaces the following recognition methods:

MethodAction
RecognizeImage(string, int)Recognition of a single-page form provided by file path.
RecognizeImage(MemoryStream, int)Recognition of a single-page form provided as a memory stream.
RecognizeMultiPageTemplate(string[], int)Recognition of a multi-page form from a single respondent.

Aspose.OMR.Generation.WritingSystems.Bengali class

Use the Bengali writing system and native Bengali numbers (optional) in generated forms.

Aspose.OMR.Generation.WritingSystems.Hebrew class

Use the Hebrew writing system and native Hebrew numbers (optional) in generated forms.

Aspose.OMR.Generation.WritingSystems.Urdu class

Use the Urdu writing system and native Urdu numbers (optional) in generated forms.

Aspose.OMR.Generation.Config.Elements.Parents.ContainerConfig.SyncBlockHeight property

If set to true, all blocks in the container will have the same height.

sync_children_height text markup attribute

If set to true, all blocks in the container will have the same height.

SyncHeight JSON markup attribute

If set to true, all blocks in the container will have the same height.

Updated public APIs:

The following public APIs have been updated in Aspose.OMR for .NET 23.6.1:

Aspose.OMR.Generation.MemoryGenerationResult.GetPDF method

This method now returns one PDF document as a single MemoryStream object, regardless of the number of pages defined in the form’s source code.

Removed public APIs:

No changes.

Changes in application logic

This section lists any changes to the program architecture and form processing algorithms introduced in Aspose.OMR for .NET 23.6.1 that may affect the behavior of existing applications.

Saving a multi-page form in one PDF document

If an OMR form has more than one page (text markup / JSON markup), it is now saved as a single PDF document, containing all pages of the form, rather than separate PDF files for each page.

Recognition of multi-page forms

The structure of recognition results depends on the format in which the completed form is provided to the Aspose.OMR.Api.TemplateProcessor.Recognize method.

Single page form

The structure of the result is not changed.

Element Name,Value,
Exam1,"C"
Exam2,"A"
Exam3,"D"
Exam4,"E"
Exam5,"B"

One page of multi-page form

The structure of the result is not changed. The page ID in Page{#} format is added before the recognition results.

Page1 :
Element Name,Value,
Exam1,"C"
Exam2,"A"
Exam3,"D"
Exam4,"E"
Exam5,"B"

Multi-page form as a single PDF document

Results from all pages are aggregated into a single file without splitting them into pages.

Element Name,Value,
Page1Exam1,"C"
Page1Exam2,"A"
Page1Exam3,"D"
Page1Exam4,"E"
Page1Exam5,"B"
Page2Exam6,"A"
Page2Exam7,"E"
Page2Exam8,"E"
Page2Exam9,"A"
Page2Exam10,"C"

Multi-page form as an array of images

Results from all pages are aggregated into a single file without splitting them into pages.

Element Name,Value,
Page1Exam1,"C"
Page1Exam2,"A"
Page1Exam3,"D"
Page1Exam4,"E"
Page1Exam5,"B"
Page2Exam6,"A"
Page2Exam7,"E"
Page2Exam8,"E"
Page2Exam9,"A"
Page2Exam10,"C"

Deprecated APIs

The following public APIs have been marked as deprecated and will be removed in 24.1.0 (January 2024) release:

Aspose.OMR.Api.TemplateProcessor.RecognizeMultiPageTemplate method

Replaced with Aspose.OMR.Api.TemplateProcessor.Recognize method.

Aspose.OMR.Api.TemplateProcessor.RecognizeImage method

Replaced with Aspose.OMR.Api.TemplateProcessor.Recognize method.

Usage examples

See the examples below to learn more about the changes introduced in this release:

Recognize a scanned PDF containing a completed form

Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
Aspose.OMR.Api.TemplateProcessor templateProcessor = omrEngine.GetTemplateProcessor("pattern.omr");
Aspose.OMR.Model.RecognitionResult recognitionResult = templateProcessor.Recognize("form-20230629.pdf");
string csv = recognitionResult.GetCsv();
File.WriteAllText("recognition_result.csv", csv);

Get a form in PDF format as a memory stream

Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
Aspose.OMR.Generation.GenerationResult generationResult = omrEngine.GenerateTemplate("source.txt");
Aspose.OMR.Generation.MemoryGenerationResult memoryGenerationResult = new Aspose.OMR.Generation.MemoryGenerationResult(generationResult);
MemoryStream stream = memoryGenerationResult.GetPDF();

Synchronizing height of all blocks in the container

?container=
	columns_count=3
	sync_children_height=true
?block=
	column=1
	border=square
	border_size=10
	border_color=red
?content=Aspose.OMR
&block
?block=
	column=2
	border=square
	border_size=10
	border_color=red
?content=The five boxing wizards jump quickly.
&block
?block=
	column=3
	border=square
	border_size=10
	border_color=red
?content=All men live enveloped in whale-lines. All are born with halters round their necks; but it is only when caught in the swift, sudden turn of death, that mortals realize the silent, subtle, ever-present perils of life.
&block
&container

Generate machine-readable form in Urdu

In this example, all Western European numbers are replaced with Urdu numbers.

Aspose.OMR.Generation.GlobalPageSettings globalPageSettings = new Aspose.OMR.Generation.GlobalPageSettings() {
	WritingSystem = new Aspose.OMR.Generation.WritingSystems.Urdu(true)
};