Migrate from 1.2

This page lists the key points to pay attention to when migrating existing code from iink SDK 1.2 to the new iink SDK 1.3.

JIIX format evolution

The JIIX format has been updated to version 2. This allowed the inclusion of style and decoration information and made possible math JIIX import by iink SDK. If you were parsing JIIX output, you will have to update your parser code to follow the (small) evolutions that came with this new version.

Interactive Ink SDK 1.3 can only import JIIX version 2 documents. In the unlikely event you would like to import JIIX files generated by previous versions of the toolkit, you will have to migrate their content by yourself.

JIIX reference (updated to version 2)

Version identification

While the original JIIX specification did not contain any versioning information, a new “version” key has been added to the root JSON object. It has a string value (currently “2”) identifying the iteration of the format.

Key changes

  • The strokes array has been replaced by an items array gathering strokes, glyphs and shape primitives.
  • For drawing blocks, a new spans array has been added to store the style when available under the form of “span” objects referencing ranges of items.
  • For text blocks, a new spans array has been added to store the style when available under the form of “span” objects referencing ranges of characters.
  • New class and style properties were added to math and diagram nodes.
  • The range property that was associated to ink in all blocks have been removed.
  • All blocks now have an id property.
You need to set the export.jiix.style configuration key to true for style information to be exported to JIIX. Also note that only dynamic style, pen style classes and styling applied with decorations will be exported. Editor-level stylesheet will not.

Batch mode changes

Starting with iink SDK 1.3, it is no longer possible to directly import batches of pointer events in “Text Document” parts. This change was motivated by the fact that it is difficult to get the ink properly aligned on the guides to get good recognition results.

Should you want to achieve a similar behavior, you are now encouraged to:

  1. Send each batch of pointer events to a dedicated “Text”, “Math”, “Diagram” or “Drawing” part depending on the type of the content you want to process. Remember to disable the guides on “Text” parts if you cannot ensure that they will match the baselines of the ink words.
  2. Call waitForIdle() to ensure that the recognition is complete.
  3. Paste as a block into your “Text Document” part at the appropriate location.
When pasting a “Text” part into a “Text Document”, iink SDK will attempt to automatically adjust the handwritten content to the guides.

We use cookies to ensure that we give you the best experience on our website Read the privacy policy