IInk SDK Web REST Diagram recognition example

Considering this request body.

Here is the svg output without conversion:

Here is the svg output with conversion:

text in ellipsetext in rectangle

Notice that the two strokeGroups enable different color render for the result.

Following is the result if you ask for application/vnd.myscript.jiix output. Notice the hierarchy and connecting links between the nodes.

{
    "type": "Diagram",
    "elements": [ {
      "type": "Node",
      "kind": "ellipse",
      "label": 12,
      "children": [ 12 ],
      "id": 91,
      "bounding-box": {
       "x": 21.88784,
       "y": 31.132622,
       "width": 121.4437,
       "height": 28.182007
      },
      "items": [ {
        "type": "arc",
        "timestamp": "2018-02-12 14:11:53.648000",
        "cx": 82.609688,
        "cy": 45.223625,
        "rx": 59.721848,
        "ry": 13.091002,
        "phi": 0,
        "startAngle": 0,
        "sweepAngle": 6.2831855,
        "id": "000015000100a900ff00"
       } ],
      "cx": 82.609688,
      "cy": 45.223625,
      "rx": 59.721848,
      "ry": 13.091002
     }, {
      "type": "Node",
      "kind": "rectangle",
      "label": 15,
      "children": [ 15 ],
      "id": 93,
      "bounding-box": {
       "x": 13.157066,
       "y": 62.636948,
       "width": 127.43226,
       "height": 38.587769
      },
      "items": [ {
        "type": "line",
        "timestamp": "2018-02-12 14:12:11.758000",
        "x1": 14.157066,
        "y1": 63.636948,
        "x2": 139.58932,
        "y2": 63.636948,
        "id": "0000160001000300ff00"
       }, {
        "type": "line",
        "timestamp": "2018-02-12 14:12:11.758000",
        "x1": 139.58932,
        "y1": 63.636948,
        "x2": 139.58932,
        "y2": 100.22472,
        "id": "0000170001000300ff00"
       }, {
        "type": "line",
        "timestamp": "2018-02-12 14:12:11.758000",
        "x1": 139.58932,
        "y1": 100.22472,
        "x2": 14.157066,
        "y2": 100.22472,
        "id": "0000180001000300ff00"
       }, {
        "type": "line",
        "timestamp": "2018-02-12 14:12:11.758000",
        "x1": 14.157066,
        "y1": 100.22472,
        "x2": 14.157066,
        "y2": 63.636948,
        "id": "0000190001000300ff00"
       } ],
      "x": 14.157066,
      "y": 63.636948,
      "width": 125.43226,
      "height": 36.587769
     }, {
      "type": "Edge",
      "kind": "line",
      "connected": [ 91, 93 ],
      "ports": [ 0, 1 ],
      "id": 92,
      "bounding-box": {
       "x": 75.873207,
       "y": 57.290749,
       "width": 4.1475601,
       "height": 7.346199
      },
      "items": [ {
        "type": "line",
        "timestamp": "2018-02-12 14:12:10.811000",
        "x1": 79.020767,
        "y1": 58.290749,
        "x2": 76.873207,
        "y2": 63.636948,
        "id": "00001a0001000300ff00"
       } ],
      "x1": 79.020767,
      "y1": 58.290749,
      "x2": 76.873207,
      "y2": 63.636948
     }, {
      "type": "Text",
      "parent": 91,
      "id": 12,
      "bounding-box": {
       "x": 51.083389,
       "y": 39.196545,
       "width": 63.052605,
       "height": 12.054165
      },
      "label": "text in ellipse",
      "words": [ {
        "label": "text",
        "candidates": [ "text", "Text", "tent", "test", "tert" ],
        "bounding-box": {
         "x": 51.083389,
         "y": 40.209404,
         "width": 19.474899,
         "height": 8.7262039
        },
        "items": [ {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:01.108000",
          "label": "t",
          "bounding-box": {
           "x": 52.083389,
           "y": 41.209404,
           "width": 3.1874008,
           "height": 6.7262039
          },
          "baseline": 0.98524868,
          "x-height": 0.80024588,
          "left-side-bearing": -0.047989625,
          "id": "00001b0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:02.548500",
          "label": "e",
          "bounding-box": {
           "x": 55.936386,
           "y": 42.358685,
           "width": 4.5475273,
           "height": 5.5769196
          },
          "baseline": 0.98220927,
          "x-height": 0.96515936,
          "left-side-bearing": -0.12454546,
          "id": "00001c0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:02.966000",
          "label": "x",
          "bounding-box": {
           "x": 61.116432,
           "y": 42.45377,
           "width": 4.8782501,
           "height": 5.382618
          },
          "baseline": 1.0000001,
          "x-height": 1,
          "left-side-bearing": -0.038983047,
          "id": "00001d0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:03.808000",
          "label": "t",
          "bounding-box": {
           "x": 66.370888,
           "y": 41.209404,
           "width": 3.1874008,
           "height": 6.7262039
          },
          "baseline": 0.98524868,
          "x-height": 0.80024588,
          "left-side-bearing": -0.047989625,
          "id": "00001e0001000700ff00"
         } ]
       }, {
        "label": " "
       }, {
        "label": "in",
        "candidates": [ "in", "im", "In", "Im", "ion" ],
        "bounding-box": {
         "x": 72.097092,
         "y": 39.456993,
         "width": 9.2140274,
         "height": 9.3793945
        },
        "items": [ {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:04.759000",
          "label": "i",
          "bounding-box": {
           "x": 73.097092,
           "y": 40.456993,
           "width": 0.96324921,
           "height": 7.3793945
          },
          "baseline": 1,
          "x-height": 0.72941172,
          "left-side-bearing": -0.82403433,
          "id": "00001f0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:05.690000",
          "label": "n",
          "bounding-box": {
           "x": 75.81321,
           "y": 42.358685,
           "width": 4.4979095,
           "height": 5.4777031
          },
          "baseline": 1.0000002,
          "x-height": 0.98264152,
          "left-side-bearing": -0.19209558,
          "id": "0000200001000700ff00"
         } ]
       }, {
        "label": " "
       }, {
        "label": "ellipse",
        "candidates": [ "ellipse", "Ellipse", "elapse", "Elapse", "ellipses" ],
        "bounding-box": {
         "x": 83.246803,
         "y": 39.196545,
         "width": 30.889191,
         "height": 12.054165
        },
        "items": [ {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:06.597000",
          "label": "e",
          "bounding-box": {
           "x": 84.246803,
           "y": 42.358685,
           "width": 4.5475235,
           "height": 5.5769196
          },
          "baseline": 0.98220927,
          "x-height": 0.96515936,
          "left-side-bearing": -0.12454546,
          "id": "0000210001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:07.007000",
          "label": "l",
          "bounding-box": {
           "x": 90.100708,
           "y": 40.196545,
           "width": 0.81442261,
           "height": 7.639843
          },
          "baseline": 0.99999994,
          "x-height": 0.70454544,
          "left-side-bearing": -1.0609137,
          "id": "0000220001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:07.408000",
          "label": "l",
          "bounding-box": {
           "x": 92.746544,
           "y": 40.196545,
           "width": 0.81442261,
           "height": 7.639843
          },
          "baseline": 0.99999994,
          "x-height": 0.70454544,
          "left-side-bearing": -1.0609137,
          "id": "0000230001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:07.790000",
          "label": "i",
          "bounding-box": {
           "x": 95.32209,
           "y": 40.456993,
           "width": 0.96324921,
           "height": 7.3793945
          },
          "baseline": 1,
          "x-height": 0.72941172,
          "left-side-bearing": -0.82403433,
          "id": "0000240001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:08.414000",
          "label": "p",
          "bounding-box": {
           "x": 98.038208,
           "y": 42.358685,
           "width": 4.7376938,
           "height": 7.892025
          },
          "baseline": 0.69408083,
          "x-height": 0.68203247,
          "left-side-bearing": -0.18237346,
          "id": "0000250001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:09.174000",
          "label": "s",
          "bounding-box": {
           "x": 103.78049,
           "y": 42.358685,
           "width": 3.8157883,
           "height": 5.5769196
          },
          "baseline": 0.98220927,
          "x-height": 0.96515936,
          "left-side-bearing": -0.13651137,
          "id": "0000260001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:09.591000",
          "label": "e",
          "bounding-box": {
           "x": 108.58847,
           "y": 42.358685,
           "width": 4.5475235,
           "height": 5.5769196
          },
          "baseline": 0.98220927,
          "x-height": 0.96515936,
          "left-side-bearing": -0.12454546,
          "id": "0000270001000700ff00"
         } ]
       } ]
     }, {
      "type": "Text",
      "parent": 93,
      "id": 15,
      "bounding-box": {
       "x": 38.600021,
       "y": 75.903748,
       "width": 76.546356,
       "height": 12.054169
      },
      "label": "text in rectangle",
      "words": [ {
        "label": "text",
        "candidates": [ "text", "Text", "test", "teat", "reset" ],
        "bounding-box": {
         "x": 38.600021,
         "y": 76.916611,
         "width": 19.474899,
         "height": 8.7262039
        },
        "items": [ {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:15.583000",
          "label": "t",
          "bounding-box": {
           "x": 39.600021,
           "y": 77.916611,
           "width": 3.1874008,
           "height": 6.7262039
          },
          "baseline": 0.98524868,
          "x-height": 0.80024588,
          "left-side-bearing": -0.047989625,
          "id": "0000280001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:16.909000",
          "label": "e",
          "bounding-box": {
           "x": 43.453014,
           "y": 79.065895,
           "width": 4.5475273,
           "height": 5.5769196
          },
          "baseline": 0.98220861,
          "x-height": 0.96515936,
          "left-side-bearing": -0.12454546,
          "id": "0000290001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:17.498500",
          "label": "x",
          "bounding-box": {
           "x": 48.63306,
           "y": 79.16098,
           "width": 4.8782539,
           "height": 5.3826141
          },
          "baseline": 0.99999946,
          "x-height": 1,
          "left-side-bearing": -0.038983047,
          "id": "00002a0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:18.240000",
          "label": "t",
          "bounding-box": {
           "x": 53.88752,
           "y": 77.916611,
           "width": 3.1874008,
           "height": 6.7262039
          },
          "baseline": 0.98524868,
          "x-height": 0.80024588,
          "left-side-bearing": -0.047989625,
          "id": "00002b0001000700ff00"
         } ]
       }, {
        "label": " "
       }, {
        "label": "in",
        "candidates": [ "in", "im", "In", "inn", "Im" ],
        "bounding-box": {
         "x": 59.613724,
         "y": 76.1642,
         "width": 9.2140274,
         "height": 9.3793945
        },
        "items": [ {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:19.176000",
          "label": "i",
          "bounding-box": {
           "x": 60.613724,
           "y": 77.1642,
           "width": 0.96324921,
           "height": 7.3793945
          },
          "baseline": 1,
          "x-height": 0.72941172,
          "left-side-bearing": -0.82403433,
          "id": "00002c0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:20.082000",
          "label": "n",
          "bounding-box": {
           "x": 63.329834,
           "y": 79.065895,
           "width": 4.4979172,
           "height": 5.4776993
          },
          "baseline": 0.99999958,
          "x-height": 0.98264152,
          "left-side-bearing": -0.19209558,
          "id": "00002d0001000700ff00"
         } ]
       }, {
        "label": " "
       }, {
        "label": "rectangle",
        "candidates": [ "rectangle", "Rectangle", "rectangles", "Rectangles", "reatangle" ],
        "bounding-box": {
         "x": 71.061089,
         "y": 75.903748,
         "width": 44.085289,
         "height": 12.054169
        },
        "items": [ {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:21.034000",
          "label": "r",
          "bounding-box": {
           "x": 72.061089,
           "y": 79.065895,
           "width": 3.0964508,
           "height": 5.4776993
          },
          "baseline": 0.99999958,
          "x-height": 0.98264152,
          "left-side-bearing": -0.2790387,
          "id": "00002e0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:21.508000",
          "label": "e",
          "bounding-box": {
           "x": 75.996765,
           "y": 79.065895,
           "width": 4.5475311,
           "height": 5.5769196
          },
          "baseline": 0.98220861,
          "x-height": 0.96515936,
          "left-side-bearing": -0.12454546,
          "id": "00002f0001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:22.099000",
          "label": "c",
          "bounding-box": {
           "x": 81.553017,
           "y": 79.065895,
           "width": 3.8860703,
           "height": 5.5769196
          },
          "baseline": 0.98220861,
          "x-height": 0.96515936,
          "left-side-bearing": -0.14574468,
          "id": "0000300001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:22.349000",
          "label": "t",
          "bounding-box": {
           "x": 85.902107,
           "y": 77.916611,
           "width": 3.1874008,
           "height": 6.7262039
          },
          "baseline": 0.98524868,
          "x-height": 0.80024588,
          "left-side-bearing": -0.047989625,
          "id": "0000310001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:23.271000",
          "label": "a",
          "bounding-box": {
           "x": 89.651741,
           "y": 79.074158,
           "width": 4.311882,
           "height": 5.5686493
          },
          "baseline": 0.98218322,
          "x-height": 0.96659243,
          "left-side-bearing": -0.10738254,
          "id": "0000320001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:23.773000",
          "label": "n",
          "bounding-box": {
           "x": 95.609009,
           "y": 79.065895,
           "width": 4.4979172,
           "height": 5.4776993
          },
          "baseline": 0.99999958,
          "x-height": 0.98264152,
          "left-side-bearing": -0.19209558,
          "id": "0000330001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:24.308000",
          "label": "g",
          "bounding-box": {
           "x": 101.02055,
           "y": 79.065895,
           "width": 5.0766907,
           "height": 7.8920212
          },
          "baseline": 0.69408035,
          "x-height": 0.68203247,
          "left-side-bearing": -0.03745928,
          "id": "0000340001000700ff00"
         }, {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:25.148000",
          "label": "l",
          "bounding-box": {
           "x": 107.25067,
           "y": 76.903748,
           "width": 0.81442261,
           "height": 7.6398468
          },
          "baseline": 1.0000005,
          "x-height": 0.70454544,
          "left-side-bearing": -1.0609137,
          "id": "0000350001000700ff00"
         },
         {
          "type": "glyph",
          "timestamp": "2018-02-12 14:12:25.708000",
          "label": "e",
          "bounding-box": {
           "x": 109.59885,
           "y": 79.065895,
           "width": 4.5475235,
           "height": 5.5769196
          },
          "baseline": 0.98220861,
          "x-height": 0.96515936,
          "left-side-bearing": -0.12454546,
          "id": "0000360001000700ff00"
         } ]
       } ]
     } ],
    "version": "2",
    "id": "MainBlock"
   }

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