2

I've been looking for days now and I am still unable to get PDF.js working on IE11, regardless of IE11 is listed as a supported browser, as showed in PDF.js DEMO.

No errors are shown in Chrome's Console. However, there are 3 errors in IE11's Console:

Chrome's Console

IE10's Console

Could anyone provide some help? Thanks

  • 2
    `Promise` is not supported in IE11, you need to add [polyfill](https://www.npmjs.com/package/promise-polyfill) – Tan Duong Apr 21 '18 at 23:58

2 Answers2

1

IE11 doesn't support ES6 format, so some features of PDF.js won't work in IE11.

You could try to use the ES5 version of pdf.js and pdf.worker.js.

Either :

  1. point import "pdfjs-dist/build/pdf.js" to import "pdfjs-dist/es5/build/pdf.js"
  2. point import "pdfjs-dist/build/pdf.worker.js" to => import "pdfjs- dist/es5/build/pdf.worker.js"

OR use ES5 version:

  1. pdf.js : https://mozilla.github.io/pdf.js/es5/build/pdf.js
  2. pdf.worker.js: https://mozilla.github.io/pdf.js/es5/build/pdf.worker.js
Shubham Yadav
  • 311
  • 2
  • 6
0

Maybe it's because IE11 doesn't support ES6. Support for ES6 in Internet Explorer 11

I hope this will help someone in the future.

Amir Naeem
  • 570
  • 6
  • 23