Software Development Kit

Myscript and Wacom Bamboo Slate Integration

How can I convert Ink Document object returned by Bamboo slate to .iink format for OCR detection?

Platform -Android

Dear Bobby,

thank you for contacting us and your question.

First, you should use the WACOM SDK to get the strokes from your wacom Bamboo slate:

Please note for any question related to Wacom (SDK, device), you shall contact them, as we have no experience with it.

Once you have the strokes, you can then provide these to our iink SDK, using the "batch mode": 



Also, please find a batch-mode sample available on github:

Once you are able to get the strokes by yourself, using the latter, you should be able to add these the iink.

Best regards,


I tried above mentioned approach but MyScript is not recognising anything. I am getting rawpoints (x,y, time in milliseconds and pressure) but No EventType from WACOM sdk. I kept the starting point as DOWN and last point as UP and rest all as MOVE but that is not working.

//Stokes from Wacom SDK
for (RawPoint rawPoint : inkStroke.getRawPoints()) {
PointerEvent pointerEvent = new PointerEvent();
pointerEvent.pointerType = PointerType.PEN;
pointerEvent.pointerId = 1;
pointerEvent.eventType = PointerEventType.MOVE;

// Transform the x and y coordinates of the stroke from mm to px
// This is needed to be adaptive for each device
pointerEvent.x = (rawPoint.x/ 25.4f) * displayMetrics.xdpi;
pointerEvent.y = (rawPoint.y / 25.4f) * displayMetrics.ydpi;

pointerEvent.t = rawPoint.timestampInMillis;
pointerEvent.f = rawPoint.pressure;

// Configure recognition
Configuration conf = engine.getConfiguration();
String confDir = "zip://" + getPackageCodePath() + "!/assets/conf";

conf.setStringArray("", new String[]{confDir});
conf.setString("content-package.temp-folder", getFilesDir().getPath() + File.separator + "tmp");
conf.setString("lang", language);

// Configure the engine to disable guides (recommended)
conf.setBoolean("text.guides.enable", false);

// Create a renderer with a null render target
displayMetrics = getResources().getDisplayMetrics();
Renderer renderer = engine.createRenderer(displayMetrics.xdpi, displayMetrics.ydpi, null);

// Create the editor
editor = engine.createEditor(renderer);

// The editor requires a font metrics provider and a view size *before* calling setPart()
Map<String, Typeface> typefaceMap = new HashMap<>();
editor.setFontMetricsProvider(new FontMetricsProvider(displayMetrics, typefaceMap));
editor.setViewSize(displayMetrics.widthPixels, displayMetrics.heightPixels);

try {
// Create a new package
contentPackage = engine.createPackage(packageName);

// Create a new part
contentPart = contentPackage.createPart(partType);
} catch (Exception e) {

// Associate editor with the new part

// Feed the editor
PointerEvent[] arr = new PointerEvent[pointerEvents.size()];
arr = pointerEvents.toArray(arr);
editor.pointerEvents(arr, false);

// Export the result of the recognition into a file
void export() {
MimeType mimeType = MimeType.TEXT;

File directory = new File(filePath.getAbsolutePath() + "/Navia Image/");

File file = new File(directory, "/"+exportFileName + mimeType.getFileExtensions());

try {
editor.export_(null, file.getAbsolutePath(), mimeType, null);
String s= editor.export_(null,mimeType);

} catch (Exception e) {


try {
} catch (IOException e) {

protected void onDestroy() {
engine = null;



Dear Bobby,

Thank you for your update.

Here are my comments:

- What is your part type?

- Do you process one or several strokes?

According to the comment in your code "//Stokes from Wacom SDK", I guess you want to process several strokes

If you are processing several strokes, setting only the starting point to DOWN and the end point to UP  is not enough, as a stroke is defined from the moment the pen touches the screen until the pen is lifted again.

So you should have a starting point (DOWN) and end point (UP) per stroke.

Please refer to this section of the documentation for an example.

Best regards,


Login or Signup to post a comment