-
Notifications
You must be signed in to change notification settings - Fork 189
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
Printing is broken on iOS #83
Comments
Nobody has upvoted this ticket for a long time, so I believe nobody uses the PDF viewer to print on an iOS device. Hence I'm closing this ticket now. |
I am using it on Android and iOS, both showing only blank pages :/ |
Oh - not that nasty bug again! I've spent countless evenings trying to figure out what's going on. On the other hand, I've learned a lot about pdf.js in the meantime, so I'm ready to have a look at it again. I can't promise you to solve the bug. But I can promise to try. |
Upvote for print on iOS - I want to integrate this in an Ionic App |
Same here, I'm very grateful for this tool, currently viewing using it and it is working on iphone in an ionic app, but download and printer button missing - think it is a cors issue... bit confused.. I'm a junior dev in that respect! |
@stuartpaulin For us (Capacitor app) the download button is working, you could take another look at your code probably :) @stephanrauh would you be open to a PR? You mentioned you already dived into pdf.js, not sure if I could help out, but could try. |
@mt-webdev Of course I'm open to pull requests! |
…nting on iOS (otherwise it prints the website or blank pages instead of the PDF file)
…he website or blank pages instead of the PDF file)
…nting on iOS (otherwise it prints the website or blank pages instead of the PDF file)
I've read the discussion of mozilla/pdf.js#7597 again and added a timeout specifically for iOS. It seems to work. The only problem is I don't have any clue what's going on - and to my experience, that's a bad when fixing bugs. Be that as it may, please try version 13.5.3 and tell me if it solves the bug on your devices, too. |
I didn't hear from you for two weeks, so I assume my bugfix works on your machine, too. |
Was in vacation for two weeks so did not test it yet 🙈 |
Enjoy your vacations - or the week-end if it's already over! Closing tickets is basically a matter of house-keeping. It feels better to have to short list. :) But I'm still listening to this channel, just add your insight as a new comment. |
I will take a look in the upcoming week (have also been on vacation 😅). Looking forward to it! |
@can2000ca What did you print, precisely? Your printout indicates you've been using Mozilla's showcase, so I'm not responsible. Nonetheless, I can try to give you some pointers. How did you print, precisely? I suppose if you hit the print button of the browser, it prints the page as-is. So it's not astonishing that the toolbar is there. However, if you're using the print button of the PDF viewer's toolbar, a lot of magic happens. Basically, your entire page is hidden in print mode. Instead, the page shows a couple of images specifically added during printing. Hiding the page and showing the images instead requires some CSS rules which are frequently overwritten by CSS frameworks. Please check your CSS rules. I've collected some of the more common traps here: https://pdfviewer.net/extended-pdf-viewer/troubleshooting |
@stephanrauh Thanks for your comments. I used the print button of the PDF viewer's toolbar. Here is what I did: |
@can2000ca I see. I've managed to reproduce the bug. It's interesting that Safari prints the file correctly on the Laptop, but fails to do so on the tablet. The pdf.js team have ceased to support Safari. That's why Jonas closed your bug ticket yesterday. They had too much trouble on a topic they consider a byplay. ngx-extended-pdf-viewer inherits most of the code from pdf.js, so I'm very reluctant fixing their bugs. My bugfix tends to get lost or broken with the next update of pdf.js. If you find out which CSS rules are missing, I can add the vendor-specific prefixes again in my fork of the PDF viewer. Generally speaking, printing on iOS has always been unreliable, but it's new that it doesn't work altogether. |
Reported at StackOverflow by Scott Garret.
Steps to reproduce: open the demo on an iPad and click the "print" button. The preview dialog opens, showing nothing but a single blank page.
The discussion on Mozilla's GitHub has several suggestions how to solve the bug: mozilla/pdf.js#7597
The text was updated successfully, but these errors were encountered: