javascript - Error: Unknown action from worker: ReaderHeadersReady when loading a PDF using PDF.js -


this code working fine yesterday morning getting error

pdf.js:276 uncaught error: unknown action worker: readerheadersready     @ error (pdf.js:276)     @ messagehandler.messagehandlercomobjonmessage (pdf.js:1565)     @ messagehandler.messagehandlercomobjonmessage (pdf.js:1565)  pdf.js:276 uncaught error: unknown action worker: getreader     @ error (pdf.js:276)     @ messagehandler.messagehandlercomobjonmessage (pdf.js:1565) 

code

  function render(file) {         pdfjs.getdocument(file.path).then(function (pdf) {             pdfdoc = pdf;             totalpages = pdf.numpages;             renderpage(pagenumber)         }).catch(function (reason) {             console.error(reason);         });     } 

and using worker

pdfjs.workersrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js'; 

the version of pdf.js using 1.7.225 lastest stable version.

does know cause error?

use specific version of worker

pdfjs.workersrc = 'https://npmcdn.com/pdfjs-dist@1.7.225/build/pdf.worker.js';


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -