extractHocr static method

Future<String> extractHocr(
  1. String imagePath, {
  2. String? language,
  3. Map? args,
})

image to html text(hocr)

String _ocrHocr = await FlutterTesseractOcr.extractText(url, language: langs, args: {
   "preserve_interword_spaces": "1",});

Implementation

static Future<String> extractHocr(String imagePath,
    {String? language, Map? args}) async {
  var promiseData = _extractText(
      imagePath,
      jsify({
        "language": language,
        "args": {...args!, "tessjs_create_hocr": "1"}
      }));
  var rtn = await promiseToFuture(promiseData);
  return rtn;
}