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

Safari iPad iOS 10.2 - PDF not loading #7936

Closed
emilgodsk opened this issue Jan 8, 2017 · 5 comments
Closed

Safari iPad iOS 10.2 - PDF not loading #7936

emilgodsk opened this issue Jan 8, 2017 · 5 comments

Comments

@emilgodsk
Copy link

emilgodsk commented Jan 8, 2017

Configuration:

  • Web browser and its version: Safari - iOS 10.2
  • Operating system and its version: iOS 10.2
  • PDF.js version: 1.5.188

When i load up PDF.js on Safari iPad iOS 10.2, no pdf is displayed. The PDF.js framework displays, but a pdf never loads. I can fix this by going in and setting: disableRange: to true in viewer.js. I have tried including the compatibility.js file, but it still does only work is disableRange is set to true.

Works perfectly well in Chrome on Windows with the disableRange set to false.

@Snuffleupagus
Copy link
Collaborator

I believe that this should have been fixed by PR #7841, which (among other things) disables range requests on iOS devices.

PDF.js version: 1.5.188

If you use the latest version of compatibility.js, as found at https://github.com/mozilla/pdf.js/blob/master/web/compatibility.js, does that resolve the issue?

@Snuffleupagus
Copy link
Collaborator

Closing as answered, since the advice in #7936 (comment) should be enough to fix this issue.

@pedropcruz
Copy link

@Snuffleupagus i cant understand how you include compatibility, when you get worker and document. I can show the code here:

first, i'm using require:

 var pdfjsLib = require('pdfjs-dist/build/pdf');
 pdfjsLib.PDFJS.workerSrc = require('pdfjs-dist/build/pdf.worker');

        pdfjsLib.PDFJS.getDocument(this._pdfPath).then(function(pdfDoc_){
            pdfDoc = pdfDoc_;
            renderPage(pageNum, 1);
        });

@rashnk
Copy link

rashnk commented Jan 31, 2019

Crashed chrome on iPad while rendering pdf with 70 pages,
[https://github.com/mozilla/pdf.js/blob/master/web/compatibility.js](@Snuffleupagus this link does not exist, https://github.com/mozilla/pdf.js/blob/master/web/compatibility.js)

@marcoiai
Copy link

Can't seem to make it work on ios too! compatibility.js is gone from the repo!

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

No branches or pull requests

6 participants