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

Does not load on android #5427

Closed
rbenjamint opened this issue Oct 21, 2014 · 7 comments
Closed

Does not load on android #5427

rbenjamint opened this issue Oct 21, 2014 · 7 comments

Comments

@rbenjamint
Copy link

The pdf viewer does not load the pdf on android devices, the problem is also at the demo page.
Can't find the problem

@timvandermeij
Copy link
Contributor

The demo page works perfectly fine on my Nexus 4 with the latest Firefox version. We will need more information in order to look into this: browser name and version, Android version, phone/tablet type, warnings/errors in the console, etc. Closing as invalid for now, but we can reopen this if more information is provided.

@rbenjamint
Copy link
Author

Im using Genymotion, a customer uses a Samsung Note 3.
How can I get the best information for helping me with this problem?

@timvandermeij
Copy link
Contributor

We would at least need to know which Android version is running on the devices. Are you using Firefox or another browser app?

@rbenjamint
Copy link
Author

android 4.2.2 im using the standard browser on android

@kamjim
Copy link

kamjim commented Oct 22, 2014

I'm seeing the same problem in the native browser in Android 4.1 (verified on Asus tablet running 4.1.2 and Nexus 7 on 4.1.0).

Seems to be a problem with setting the xhr.ResponseType to an unsupported value in that version of WebKit at line 1690 in pdf.worker.js, which is throwing a DOM Exception 12 Syntax Error

xhr.responseType = 'moz-chunked-arraybuffer';

Commenting out that line got it working for me. Can we get this addressed and updated in the pdfjs-dist Bower distribution? I really do not want to be maintaining a custom version of a 1MB javascript file in my project.

@yurydelendik
Copy link
Contributor

Let's add try/catch around this line https://github.com/mozilla/pdf.js/blob/master/src/core/network.js#L119 with comment Some legacy browsers might throw an exception. Marking as starter bug.

Can we get this addressed and updated in the pdfjs-dist Bower distribution? I really do not want to be maintaining a custom version of a 1MB javascript file in my project.

Once fixed, it will be automatically updated at pdfjs-dist.

thejdeep added a commit to thejdeep/pdf.js that referenced this issue Oct 27, 2014
thejdeep added a commit to thejdeep/pdf.js that referenced this issue Oct 27, 2014
Fix of pdf not loading on android (issue 5427)
yurydelendik added a commit that referenced this issue Dec 8, 2014
@Snuffleupagus
Copy link
Collaborator

Closing as fixed by PR #5448.

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

No branches or pull requests

5 participants