How to read InkML file to image or text using C#

478 Views Asked by At

I am trying to read handwritten text in onenote from the APIs provided by microsoft. I am able to get the handwritten text from onenote as inkML. Unfortunately I am unable to read from the inkML to image/text.Please suggest some solutions or links that can help me.

I need library or package that will help me with C#

1

There are 1 best solutions below

3
On BEST ANSWER

The OneNote API supports getting InkML in beta: https://developer.microsoft.com/en-us/office/blogs/onenote-ink-beta-apis/

The you can use InkMLJs to render it to a canvas: https://github.com/Microsoft/InkMLjs

Once you have it in a canvas, you can export to an image How To Save Canvas As An Image With canvas.toDataURL()?

As for the “extracting text” part… OneNote API does not support getting the ink analysis text from the OneNote page, so you'd have to run the analysis yourself via the coordinates in the InkML.