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 {
  assert(await File(imagePath).exists(), true);
  final String tessData = await _loadTessData();
  final String extractText =
      await _channel.invokeMethod('extractHocr', <String, dynamic>{
    'imagePath': imagePath,
    'tessData': tessData,
    'language': language,
    'args': args,
  });
  return extractText;
}