/** * Gets recognized text. * * @return the recognized text */ private String getOCRText() { Pointer utf8Text = hocr ? api.TessBaseAPIGetHOCRText(handle, pageNum - 1) : api.TessBaseAPIGetUTF8Text(handle); String str = utf8Text.getString(0); api.TessDeleteText(utf8Text); return str; }