gustavomazzoni / cordova-plugin-tesseract

Cordova Plugin for OCR process using Tesseract
77 stars 34 forks source link

TesseractPlugin is not defined #10

Open VitorHFLopes opened 8 years ago

VitorHFLopes commented 8 years ago

I don't know if is an issue or if I'm doing something wrong, but I'm getting "TesseractPlugin is not defined" when I try to call TesseractPlugin.loadLanguage or TesseractPlugin.recognizeText.

The project is building with success, but I'm having this problem, could someone help me?

gustavomazzoni commented 8 years ago

Seems like you don't have this cordova-plugin-tesseract installed. Or maybe you just need to build your project again to make sure it was included.

Check if you have it installed by running following command on your terminal (inside your project folder): $ cordova plugin list

It should show cordova-plugin-tesseract in the list. If it's not, make sure to follow all steps in the README.

kamalkrjain commented 7 years ago

Hi,

I am trying to add this library to my project. i successfully added to my ionic-v2 project. everything is done but still i cannot use it. getting same problem.

Please advise what to do to resolve this "TesseractPlugin is not defined" issue.

please find below result from suggested command too

$ cordova plugin list

com.googlemaps.ios 2.1.1 "Google Maps SDK for iOS" cordova-plugin-compat 1.1.0 "Compat" cordova-plugin-console 1.0.5 "Console" cordova-plugin-device 1.1.4 "Device" cordova-plugin-file 4.3.1 "File" cordova-plugin-googlemaps 1.4.0 "phonegap-googlemaps-plugin" cordova-plugin-http 1.2.0 "SSL Pinning" cordova-plugin-splashscreen 4.0.1 "Splashscreen" cordova-plugin-statusbar 2.2.1 "StatusBar" cordova-plugin-tesseract 0.0.1 "Tesseract Plugin"

please help.

Brain2000 commented 7 years ago

I have the same problem. TesseractPlugin is not defined. I believe I solved mine by calling window.TesseractPlugin. Now I'm getting errors "ReferenceError: deferred is not defined"

boltex commented 7 years ago

@Brain2000 The deferred thing is just an example object of deferred callback function.

juanka1985 commented 7 years ago

Any solution for this???

hamza-iqbal-hi commented 7 years ago

Any Solution?

IanDsouza commented 6 years ago

Hey Please reply I am getting this Error : Cannot read property 'loadLanguage' I am using (window).TesseractPlugin.loadLanguage(language, function(response) { console.log('language', response); }, function(reason) { console.log('Error on loading OCR file for your language. ' + reason); });

ChrisTomAlx commented 6 years ago

Have you tried on a device?

Try these steps :-

1) Create blank Ionic Project in terminal ionic start myproject blank

2) Add plugin to project ionic cordova plugin add cordova-plugin-tesseract

3) Now navigate to E:\myproject\src\app\app.component.ts

4) Then in terminal ionic cordova run android

This knowledge is from here. It worked with another plugin. I will try it with this plugin soon and let you guys know if I have any luck. In the meantime posted this solution here for anyone looking for it.

Cheers, Chris Neutrinos