sayanee / angularjs-pdf

:page_facing_up: An AngularJS directive <ng-pdf> to display PDF files with PDFJS
http://sayan.ee/angularjs-pdf/
MIT License
494 stars 248 forks source link

IE issue - No PDFJS.workerSrc specified #221

Open sanjayradadiya opened 6 years ago

sanjayradadiya commented 6 years ago

Directive is not working on internet explorer its getting No PDFJS.workerSrc specified error.

cschwaderer commented 6 years ago

I had the same IE error in my project, maybe the reason is also the same (it's strange enough):

I have basically just one JavaScript file which is called "myapp.js". All AngularJS and PDF.JS stuff is concatenated into this file. The PDF.JS worker file is called "myapp.worker.js" - and has to be in the same folder as "myapp.js". I ran into a problem with IE 11 when I set the defer attribute in the <script> tag with which "myapp.js" is referenced, getting the error you mention. After removing defer it worked again in IE.