0

I am using Tesseract Js OCR, Referring tesseract.js In that local-installation approach

Below is my Code

<script src="~/Scripts/tessaract.js"></script>
TesseractObj = Tesseract.create({
                workerPath: 'http://localhost:14180/scripts/worker.js',
                langPath: 'http://localhost:14180/scripts/',
                corePath: 'http://localhost:14180/scripts/index.js',
            });


TesseractObj.recognize(file)
            .progress(function (p) { console.log(p); })
            .then(function (result) {
              // my remaining code on result }
            });

All required js and eng.traineddata.gz files I have downloaded and referring from my solution

On Chrome browser it processing correclty but On Internet Explorer 11 it is throwing below DataCloneError IE data clone error

In worker.js file when postMessage function is called then getting this error on IE 11

global.addEventListener('message', function (e) {
    var packet = e.data;
    workerUtils.dispatchHandlers(packet, function (obj) {
        return postMessage(obj);
    });
});

Note: When I was referring cdn file then working on IE browser

Thanks in advance

Suyog
  • 171
  • 7

0 Answers0