If task.RunMethod("isSuccessful", Null) Then
res.Success = True
Dim Text As JavaObject = task.RunMethod("getResult", Null)
res.Text = Text.RunMethod("getText", Null)
' to get the angle you have to iterate through all the lines...
Dim textblocks As List = Text.RunMethod("getTextBlocks",Null)
Log("blocks: " & textblocks.Size)
Dim i As Int
For i = 0 To textblocks.Size - 1
Dim tb As JavaObject
tb = textblocks.Get(i)
Dim lines As List = tb.RunMethod("getLines",Null)
Log("lines in this block: " & lines.Size)
For Each line As JavaObject In lines
Dim angle As Float = line.RunMethod("getAngle",Null)
Log("angle: " & angle)
Next
Next
Else
Log(task.RunMethod("getException", Null))
End If