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
IOS can't render certain PDFs #9570
Comments
I checked the pdf listed above in the web viewer First I check if it works with other pdfs with this pdf: In Safari: In Google Chrome: Then, I attempt to open the specified document in Safari: Attempt to open the specified document in Google Chrome I also found that if I try to open the working pdf with the web viewer after having tried to open hanyan123's pdf, the working pdf no longer rendered. In Safari: In Google Chrome: |
We've also run into this problem with another document on iOS: https://tcpdf.org/files/examples/example_033.pdf (1-page PDF) After investigating we did get some additional info on this error:
|
I have observed something similar, although in my case, I've never seen the document display even after waiting. I described my observations on StackOverflow - I'll repeat my question here, along with someone's cogent response:
Here's the response:
CutePDF doesn't provide the option to control the bitmap that way - it just does it. What is it about a "single large XObject wrapped in a pattern" that pdf.js doesn't like - and, how can I control, e.g., Acrobat PRO to render as CutePDF does (if that's the workaround)? |
Any update on this issue? I have also encountered it. |
That PDF document is quite small/simple, and it mostly contains regular text. The few images which it contains (as annotations) are also small enough that this shouldn't be an issue even for iOS (which has some problems with huge (Also, given that there's a couple of different PDF documents listed elsewhere in this issue that makes it somewhat difficult to know if all of those documents even suffer from the same bug.) It's possible that iOS/Safari has problems loading fonts, and the e.g. the CSS Font Loading API isn't working correctly there; however in that case that's a bug in iOS/Safari rather than in the PDF.js library.
All-in-all, closing this for now, given that this issue is apparently specific to just one platform/browser and that it's unfortunately difficult to see what (if anything) we could do about this here. (Please keep in mind that the Firefox built-in PDF viewer is the main focus of development for this library.) |
Thank you. I will only add, that serendipitously I discovered if I render the pdf with CutePDF Writer, the problem disappears. That somehow pertains, but I don't know the reason why. |
16391_49885.pdf
Configuration:
Web browser and its version: Safari Latest
Operating system and it
s version: iOS 11.1.1
PDF.js version: latest
Steps to reproduce the problem:
Load attached file in any pdf.js renderer or viewer.
What is the expected behavior? (add screenshot)
Rendering of PDF
What went wrong? (add screenshot)
Blank white canvas is shown rather than the pdf.
This only happens on iOS browsers. It works on all browsers for windows and all browsers for MacOS. It also works on Google Chrome on an Android device.
The text was updated successfully, but these errors were encountered: