Pdf.js: Demo Site broken on Edge an InternetExplorer

Created on 18 Feb 2020  路  7Comments  路  Source: mozilla/pdf.js

Since the last Windows Update the demo site ist not working anymore on Edge and Internet Explorer. Tested on several computers.

Attach (recommended) or Link to PDF file here: https://mozilla.github.io/pdf.js/web/viewer.html

Configuration:

  • Web browser and its version: Microsoft Edge 44.18362.449.0, Internet Explorer 11.592.18362.0
  • Operating system and its version: Windows 10 Enterprise 1903
  • PDF.js version: 2.4.370
  • Is a browser extension: no

Steps to reproduce the problem:

  1. call https://mozilla.github.io/pdf.js/web/viewer.html in one of the browsers mentioned above

What is the expected behavior?
The demo PDF ist displayed

What went wrong?
The demo PDF is not displayed - Error Message: SCRIPT0: Function expected

image

image

All other browsers tested are working like expected.

Most helpful comment

We came across the same issue and found the ES5 version working for us. Is there a plan how long the ES5 version will be supported? IE11 is quite a relevant browser for a number of our users. Yes, they should upgrade but in big companies there are sometimes strange policies.

All 7 comments

Thank you for the fast reply! Yes the old link is working in both browsers: https://mozilla.github.io/pdf.js/es5/web/viewer.html

I did not expect the Edge as "old" Browser ;-)

I did not expect the Edge as "old" Browser ;-)

Well, it has now been replaced by a Chromium based one by Microsoft. Furthermore, please note https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support:

While the library and the default viewer should still work in IE 11/Edge (non-Chromium-based) for the time being, some functionality/features may not be available and the performance will be worse compared to modern browsers. Going forward, only bugs which completely prevent the library and/or the default viewer from running will be accepted.

We came across the same issue and found the ES5 version working for us. Is there a plan how long the ES5 version will be supported? IE11 is quite a relevant browser for a number of our users. Yes, they should upgrade but in big companies there are sometimes strange policies.

For now the ES5 version will remain available. This might change for the next major version, 3.0, but no decision has been made about that yet.

What is eventually missing, is a minimized ES5 build. But that's not critical.

If it were up to me, support for IE11 would have been removed years ago :-)

Over the years, keeping support for old browsers such as IE11 has required a lot of time and effort. Most of this work has been done by unpaid contributors, e.g. @timvandermeij and myself, despite none of those people actually using IE11 (and no one should be using it really).
In practice this means that contributors have been spending time supporting a dead browser, rather than improving the general PDF.js library by e.g. fixing bugs and implementing new features.

Furthermore, support for IE11 has on more than one occasion prevented or at least significantly delayed adoption of e.g. new JavaScript/CSS features; thus hurting the general PDF.js library in the name of IE11 support.


Note that over the last couple of years, we've been relying more and more on the excellent core-js library to help with polyfilling new JavaScript features. However, it appears that that library may now have become unmaintained, which could quickly become a problem for many projects (PDF.js included).

For now the ES5 version will remain available. This might change for the next major version, 3.0, but no decision has been made about that yet.

If core-js becomes unmaintained, and a replacement polyfill library isn't found, sooner or later IE11 support in PDF.js would be in real trouble even before the next major version!

Please keep in mind that the main goal of the PDF.js project is to provide the PDF Viewer that's built-in to Firefox (and not to support IE11), and if it becomes difficult to easily polyfill new JavaScript features then it may be necessary to stop supporting IE11.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patelsumit5192 picture patelsumit5192  路  3Comments

sujit-baniya picture sujit-baniya  路  3Comments

THausherr picture THausherr  路  3Comments

smit-modi picture smit-modi  路  3Comments

jigskpatel picture jigskpatel  路  3Comments