-
Notifications
You must be signed in to change notification settings - Fork 182
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
Print preview #175
Comments
After more debugging what I fount that in image this visible vertical line is a border style around PDF but somehow PDF self is hidden. |
Printing is always a pain with pdf.js. Cutting a long story short, it's almost always your CSS code. The PDF viewer generates the PDF pages as a hidden list of images at the end of the HTML document. A media query inverts visibility: everything is hidden except the images. As it turns out, there are many ways to break algorithm. Funny thing is the vertical line. That's a new one. I don't have a clue where this comes from. Please have a look at #170, #164, #152, and #148. They contain several bug patterns that may help you to debug and solve your issue. Oh, and please tell me when you've managed to solve your bug. You can also send me a reproducer (i.e. a small but complete example running out-of-the-box without forcing me to install anything) if you're still struggling with the bug. |
I see that images are inside div and if I change div to span or move from div then images are visible in print preview. Maybe you can comment more on why those images are inside div's and what CSS selection makes them visible when printing? Because I trying to find out which styles are getting overwritten. Also I using bootstrap 3. |
Found the issue and the fix is to override div style display to use inline like this: |
@RobertasM Awesome! I'll add your hint to the documentation. |
I've added the code snippet to https://pdfviewer.net/troubleshooting |
I've went over the print CSS again. When you update to version 9.0.0, your bugfix stops working. I believe you won't need the workaround once you've updated. |
Hi,
I showing PDF viewer in modal it loads and shows pdf content, but when I try to print it opens print preview and nothing shown just empty pages. No errors in console. Maybe some ideas what can be wrong?
browser: chrome
angular version: 8.1.3
pdf viewer version: ngx-extended-pdf-viewer: 1.8.0-rc.1
The text was updated successfully, but these errors were encountered: