cordova-plugin-mobile-ocr
cordova-plugin-mobile-ocr copied to clipboard
ERROR TypeError: Object(...) is not a function at OCR.recText
Hi, I'm trying to use ocr plugin in my ionic 3 project, but when I call recText console returns this error: ERROR TypeError: Object(...) is not a function at recText.
I used this commands to install the plugin: ionic cordova plugin add cordova-plugin-mobile-ocr npm install @ionic-native/ocr
my function:
readTag(){ this.ocr.recText(OCRSourceType.BASE64, this.imageText) .then((res: OCRResult) => { console.log(JSON.stringify(res.blocks.blocktext)); this.ocrTextHTML = JSON.stringify(res.blocks.blocktext); }) .catch((error: any) => console.error(error));
}
Does someone know how to fix this? thanks for any help.
Obs: I made the same example in ionic 5 project and it worked.
Hey @JrLouis1101
You will probably have to raise this with the ionic guys. I don't maintain the ionic documentation. Sorry I could not be of any help.
Here is ionic desc : The issue raised on Ionic Document
BUG NO : [#37] (https://github.com/NeutrinosPlatform/cordova-plugin-mobile-ocr/issues/37)
I'm getting the same error. Tried following the links to the other issue (# 37 raised with Ionic guys) and that was marked as closed due to duplicate. ???