Migration guide
This page lists the key points to pay attention to when migrating existing code from MyScript iink SDK 4.1 to the new MyScript iink SDK 4.2.
Handwriting generation changes
With the introduction of Chinese text handwriting generation, we have renamed the resource file for English text from hw-gen.res in 4.1 to en-hw-gen.res in 4.2.
So, be sure to deploy the new en-hw-gen.res resource in your handwriting generation project when upgrading to 4.2.
Refactoring of createFromId
The HandwritingProfileBuilder class now has a new method, getPredefinedProfileCount, which retrieves the number of predefined writing profiles embedded in the language resource. For consistency, the createFromId method has been renamed getPredefinedProfileAt which allows you to retrieve the desired profile by index.
This change results in the removal of the PredefinedHandwritingProfileId enum, which is now useless.
For more details, see the Handwriting generation user guide.
Control of stroke location for handwriting generation.
If you were using the handwriting-generation.session.left-x-mm property with iink SDK 4.1, note that you can now better control stroke location:
- Set the
handwriting-generation.session.origin-x-mmproperty to the generation position of the first line, if you want the first line to be in a different position than the other lines. - Use the
handwriting-generation.session.left-x-mmproperty for the left alignment/clipping boundary of the other lines.
OffscreenEditor default Math configuration changes
The default Math configuration associated with OffscreenEditor has been modified to ensure that strokes generated by the MathSolverController and their bounding box are provided without any additional configuration when requesting the JIIX action output:
math.solver.enable-syntactic-correctionis nowfalse.math.solver.display-implicit-multiplyis nowfalse.math.solver.numerical-computationis now[ "at-right-of-equal-sign" ].
To avoid the new default configuration, and keep the previous one, modify the OffscreenEditor configuration immediately after creation as follows:
// retrieve OffscreenEditor current configuration
Configuration conf = offscreenEditor.getConfiguration();
// set previous default values
configuration.setStringArray("math.solver.numerical-computation", arrayOf("anywhere"))
configuration.setBoolean("math.solver.enable-syntactic-correction", true)
configuration.setBoolean("math.solver.display-implicit-multiply", true)
New LaTeX label for Math blocks in JIIX
To facilitate math integration, JIIX Math blocks now come with LaTeX labels containing the associated recognition result.
If you don't want this label, you must set the export.jiix.math-label setting to false, as it is enabled by default.
New vertical operation rule
Our advanced analyzer raw-content2 combined with the math2 bundle now contains a new VopRule allowing it to recognize vertical operations.
New contentChanged2 method for IEditorListener and IOffscreenEditorListener
The IEditorListener and IOffscreenEditorListener interfaces now include a new method, contentChanged2. This notification provides lists of added, removed, and updated blocks whenever the content of a Raw Content part changes.
Support of export.jiix.text.lines by the Raw Content Recognizer
The configuration export.jiix.text.lines is now supported by the Raw Content Recognizer.
Since its default value is false, JIIX export of Raw Content Recognizer text blocks no longer includes the “lines” object.
➤ To keep the previous behavior, you must set export.jiix.text.lines to true.
MyScriptPrediction library removal
The MyScriptPrediction library is no longer shipped since 4.0.0 because it is no longer used. However, as of 4.1.0, this library is no longer compatible with other libraries, so if is still in your environment, you may encounter errors when loading the iink libraries and your application may crash at runtime.
To avoid problems when upgrading to 4.2, search for any file named MyScriptPrediction. in your application environment and delete it.