-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Zoom limit on iOS #11245
Comments
That's quite strange, since the maximum canvas size should be limited to a much smaller value on mobile platforms; see pdf.js/web/viewer_compatibility.js Lines 23 to 29 in 16ae7c6
|
Then I guess I know what the problem is: Apple have made Safari on ipadOS 13 "a desktop class browser" which means that it reports EXACTLY the same navigator.userAgent string as Safari on MacOS reports => isIOS() returns false. According to https://stackoverflow.com/questions/57765958/how-to-detect-ipad-and-ipad-os-version-in-ios-13-and-up the only way currently to distinguish between Safari 13 on Mac and ipadOS is to test for navigator.maxTouchPoints > 1. |
This seems kind of, well, unfortunate to me; but obviously that part of the problem is not something we can fix... Anyway, can you please check if preview build in PR #11246 is enough to work-around this issue? |
I can only agree. The build at http://54.67.70.0:8877/65321f96da43bee/web/viewer.html works on my ipad pro running ipadOS 13.1.2. When will this fix be available in a build of the npm library? |
Considering that it's neither approved nor landed yet, that's probably anyone's guess at this point :-) Given that the default viewer (purposely) isn't shipping via npm, I'd assume that you're using the viewer components in some way. In that case, note that the Lines 33 to 66 in 16ae7c6
|
The fix is now merged and will be in the next release, but it's not yet known when that is going to be made. For now it's best to set |
I am running into the same issue. I tried to change |
Attach (recommended) or Link to PDF file here:
zoom test.pdf
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot) : to be able to zoom more than 200%
What went wrong? (add screenshot): white is shown instead of the content of the file.
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): https://mozilla.github.io/pdf.js/web/viewer.html
It seems that the zoom limit is different for different files. Is there a way to calculate what it is at runtime each file so I avoid showing white instead of the file without having to set a very low zoom limit on iOS devices?
The text was updated successfully, but these errors were encountered: