cordova-plugin-mobile-ocr icon indicating copy to clipboard operation
cordova-plugin-mobile-ocr copied to clipboard

ERROR TypeError: Object(...) is not a function at OCR.recText

Open JrLouis1101 opened this issue 4 years ago • 4 comments

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.

JrLouis1101 avatar May 23 '20 21:05 JrLouis1101

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.

Cheers, Chris Neutrinos

ChrisTomAlx avatar May 24 '20 15:05 ChrisTomAlx

Here is ionic desc : The issue raised on Ionic Document

BUG NO : [#37] (https://github.com/NeutrinosPlatform/cordova-plugin-mobile-ocr/issues/37)

sonydaman avatar Aug 15 '20 13:08 sonydaman

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. ???

CoraNers avatar Dec 11 '20 21:12 CoraNers

Could you try this instead. Its similar to this plugin and has been updated recently.

Cheers, Chris Neutrinos

ChrisTomAlx avatar Dec 12 '20 08:12 ChrisTomAlx