Pdf.js: FAQ updated for browser support?

Created on 1 Jun 2020  ·  5Comments  ·  Source: mozilla/pdf.js

Since the v2.4.456 release that switched to a default build for modern browsers, and a separate build for ES5 support, should this FAQ be updated to reflect the current status? E.g. maybe highlighting the cut-off version for browsers that require the ES5 build, versus the browser versions that should work with the default PDF.js build?

https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support

and probably also:

https://github.com/mozilla/pdf.js/wiki/Required-Browser-Features

All 5 comments

I have just updated the FAQ page with this notice and updated the required browser features page to remove outdated information. Thank you!

The FAQ mentions that HTTP Range Request headers aren't supported on all browsers, but that's not mentioned under "Required Browser Features." Should HTTP range request be added to "Required Browser Features"?

Yes, but I think it's more general that we should go over all browser features to see if they are still required. Modern features might be missing there, such as range requests, but it might also be that some features mentioned there are no longer used internally by PDF.js anymore. I have made #11954, a follow-up issue, for this; thanks!

I think that highlighting the cut-off version for browsers that require the ES5 build, as @winzig suggested, would be useful. Specially considering that as new versions are released which require new browser features, since these features won't be polyfilled in the default viewer, this cut-off will change over time.

For example, recently I published an extension to AMO which needs to include a copy of PDF.js. I wanted to include the es5 version to support older Firefox versions. However, this version requires that CSP allows unsafe-eval (see here ), which is not permitted in AMO. Therefore, I have to change to the modern-browser version of PDF.js and it would be nice to tell potential users which Firefox versions are incompatible, and which will have limited functionality.

Do you plan to provide this cut-off information? Thanks!

I think that highlighting the cut-off version for browsers that require the ES5 build,

Unfortunately trying to maintain such a list does seem (somewhat) like a losing proposition, since it's a moving target and also because it will (most likely) always be incomplete. The PDF.js contributors cannot test all possible browsers/versions, and having a list does seem like a good way of getting repeated issues along the lines of:

Browser X, version Y, doesn't work with the modern PDF.js build despite it not being mentioned as incompatible in the Wiki.

(It might be slightly more reasonable to maintain a, probably very, short list of known-good browsers for the modern PDF.js build.)

The easiest/quickest way of telling if a particular browser/version works with the modern PDF.js build, at this point in time, is probably to simply check if it works with modern version of the demo viewer; see https://github.com/mozilla/pdf.js#online-demo

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rob--W picture Rob--W  ·  34Comments

collinanderson picture collinanderson  ·  29Comments

kaymes picture kaymes  ·  62Comments

AliND picture AliND  ·  29Comments

oddjobz picture oddjobz  ·  46Comments