Browse our Products
Aspose.OMR for .NET 22.9 Release Notes
What was changed
Key | Summary | Category |
---|---|---|
OMRNET-614 | Added the ability to set the memory stream or file encoding in the GenerateTemplate method. | Enhancement |
OMRNET-614 | Inline paragraphs (text markup / JSON markup): placing all paragraph elements on the same line. | New feature |
OMRNET-614 | Vertical alignment of elements inside inline paragraphs (text markup / JSON markup). | New feature |
OMRNET-614 | Automatic column wrapping can be enabled in the page settings. | New feature |
OMRNET-614 | Individual adjustment of top, bottom, left, and right border for CustomAnswerSheet (text markup / JSON markup), Block (text markup / JSON markup), InputGroup (text markup / JSON markup), and TableTitle (text markup / JSON markup) elements. | New feature |
OMRNET-614 | Switching bubble placement for Answer elements (text markup / JSON markup). | New feature |
OMRNET-614 | Setting text color for Text (text markup / JSON markup), Content (text markup / JSON markup) and WriteIn (text markup / JSON markup) elements. | New feature |
OMRNET-614 | Customizing the underlying label of WriteIn elements (text markup / JSON markup). | New feature |
Known issues and limitations
Key | Summary | Workaround |
---|---|---|
OMRNET-462 | Recognition of multi-page PDF and TIFF files causes an error. | Scan each page of the filled form into a separate file and recognize them one-by-one. |
OMRNET-555 | Recalculate 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. |
Public API changes and backwards compatibility
This section lists all public API changes introduced in Aspose.OMR for .NET 22.9 that may affect the code of existing applications.
Added public APIs:
The following public APIs have been added in this release:
Vertical alignment of paragraph elements
A new vertical_align
attribute / property has been added to paragraphs. It controls how inline elements of different sizes align vertically within the lines of a paragraph:
Value | Alignment |
---|---|
top | The elements are aligned with the top of the tallest element on the line. |
center | Smaller elements are placed in the middle of the line (default). |
bottom | The bottom of the elements are aligned with the bottom of the entire line. |
Automatic column wrapping
A new Wrap
property has been added to page settings that allows to enable automatic wrapping of columns in multi-column layouts:
Value | Alignment |
---|---|
Aspose.OMR.Generation.WrappingPolicy.None | Disable column wrapping (default). |
Aspose.OMR.Generation.WrappingPolicy.Column | Enable column wrapping. |
Individual adjustment of element borders
New attributes / properties have been added to CustomAnswerSheet (text markup / JSON markup), Block (text markup / JSON markup), InputGroup (text markup / JSON markup), and TableTitle (text markup / JSON markup) elements that allow to control the width and color of each element border:
Property | Border |
---|---|
border_top_style | Top border |
border_bottom_style | Bottom border |
border_left_style | Left border |
border_right_style | Right border |
These properties override the size (border_size
) and color (border_color
) of the element’s global border.
The value of the property is provided in <border width> <border color>
format, for example border_right_style=10 blue
. You can also specify none
to remove the corresponding border.
Bubble placement
The bubble position of an Answer element (text markup / JSON markup) can be switched with bubble_position
attribute / property:
Value | Position |
---|---|
left | Place a bubble to the left on the answer (default). |
right | Place a bubble to the right on an answer. |
Text color
A new color
attribute / property has been added to Text (text markup / JSON markup), Content (text markup / JSON markup) and WriteIn (text markup / JSON markup) elements.
It allows to define the color of an element’s text.
Underlying label of WriteIn elements
A new hint
attribute / property has been added to WriteIn elements (text markup / JSON markup). It allows to re-define an underlying label of the write-in field.
By default, a write-in field has a label “write-in”.
Updated public APIs:
The following public APIs have been updated in this release:
OMR form source encoding
Compatibility: fully backward compatible.
This change will not affect existing code, print forms, or recognition results.
An optional parameter of type System.Text.Encoding has been added to GenerateTemplate method which allows to determine the encoding of the form source file or memory stream.
By default, content is treated as UTF-8.
Removed public APIs:
No changes.
Usage examples
See the examples below to learn more about the changes introduced in this release:
OMR form source encoding
Aspose.OMR.Generation.GenerationResult generationResult = null;
using(System.IO.FileStream fs = new System.IO.FileStream("source.txt", System.IO.FileMode.Open))
{
System.IO.MemoryStream ms = new System.IO.MemoryStream();
fs.CopyTo(ms);
generationResult = omrEngine.GenerateTemplate(ms, Encoding.ASCII);
};
Automatic column wrapping
Aspose.OMR.Generation.GlobalPageSettings globalPageSettings = new Aspose.OMR.Generation.GlobalPageSettings() {
PaperSize = Aspose.OMR.Generation.PaperSize.Tabloid,
Orientation = Aspose.OMR.Generation.Orientation.Horizontal,
BubbleColor= Aspose.OMR.Generation.Color.Red,
Wrap = Aspose.OMR.Generation.WrappingPolicy.Column
};
Inline paragraph with vertical alignment
?paragraph=top
type=inline
vertical_align=top
?content=Good
font_style=bold
font_size=15
?content=morning
font_style=italic
font_size=15
?content=mister
font_style=italic
font_size=10
?content=Anderson
font_style=italic
font_size=15
¶graph
?paragraph=center
type=inline
vertical_align=center
?content=Good
font_style=bold
font_size=15
?content=morning
font_style=italic
font_size=15
?content=mister
font_style=italic
font_size=10
?content=Anderson
font_style=italic
font_size=15
¶graph
?paragraph=bottom
type=inline
vertical_align=bottom
?content=Good
font_style=bold
font_size=15
?content=morning
font_style=italic
font_size=15
?content=mister
font_style=italic
font_size=10
?content=Anderson
font_style=italic
font_size=15
¶graph
Individual adjustment of element borders
?container=
columns_count=3
?block=
column=3
border=rounded
?content=rounded
font_size=20
&block
?empty_line=
height=100
?block=
column=3
border=rounded
border_top_style=none
border_bottom_style=10 red
?content=partial rounded
font_size=20
&block
?empty_line=
height=100
?block=
column=3
border=rounded
border_right_style=10 blue
border_left_style=10 red
?content=partial rounded 2
font_size=20
&block
&container
Bubble placement
?answer=Bob Barr and Wayne A. Root
bubble_position=right
bubble_type=square
?content=LIB
font_size=8
align=right
&answer
Text color
?text=This text will be rendered in red
color=red
Underlying label of write-in element
?container=Example
?block=Write-in element
?content=Your phone number:
font_style=Bold
?write_in=Phone
required=true
hint=phone number with country code
&block
&container