Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable20] Fix PDF viewer failing on Edge (not based on Chromium) #299

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Jan 28, 2021

⚠️ This backport had conflicts and is incomplete ⚠️

backport of #297

Since version v2.4.456 the PDF.js library is published as two different
packages, a non-translated/non-polyfilled build for modern browsers and
an ES5 compatible build for older browsers.

The PDF viewer was using the build for modern browsers, so it did not
work, for example, on Edge (the original version not based on Chromium).
This has been changed to use the ES5 build instead for maximum
compatibility.

Unfortunately, the ES5 build requires allowing "unsafe-eval" in the
iframe where the PDF.js library is loaded.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants