Search docs/

MobileOCR

This plugin attempts to identify and extract text from an image.

https://github.com/NeutrinosPlatform/cordova-plugin-mobile-ocr

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Installation

ionic cordova plugin add cordova-plugin-mobile-ocrnpm install @ionic-native/ocr
Ionic Native Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS

Usage

import { MobileOCR, OCRSourceType } from '@ionic-native/ocr/ngx';


constructor(private ocr: MobileOCR) { }

...

this.ocr.recText(OCRSourceType.NORMFILEURL, "file://path/to/image.png")
  .then((res: OCRResult) => console.log(JSON.stringify(res)))
  .catch((error: any) => console.error(error));