-
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 Button opens dialog with only last page. Other pages are omitted #143
Comments
Can you send me a simple reproducer? I'm already chasing this bug since a long time and I'm clueless. The bug simply doesn't happen on my machine. BTW, I'm pretty sure you can drop the |
Unfortunately I couldn't reproduce it myself in a new simple project. I suspected jsPdf and jsPdf Autotable might have caused this so I added them to new project too but still it worked! Please don't close this issue for a week, I'll see how my existing project is different and giving this trouble. btw, Nice library and many thanks for providing this! |
Sometimes these issues are caused by the |
@ravikumarbggit Any progress? I'm reluctant to close issues that clearly exist, but npm punishes projects that solve issues slowly, so I don't want to wait forever... |
@stephanrauh , no luck reproducing it. I have created my own custom buttons for download and print (iframe contentWindow print) in project. Thanks for your response. |
@stephanrauh For what its worth ... I had a similar issue when displaying a dialog box in material while displaying a pdf document and the printing did not work. Even with the @media print{} overrides it didn't fix it. What I discovered is that in some instances material dialog boxes adds a cdk-global-scrollblock to the class attribute in the html directive. The class implements the override-y which breaks the printing while a dialog is open and trying to print. I had to add a global style override to fix the problem with dialogs. html.cdk-global-scrollblock {
width: initial;
position: initial;
overflow-y: initial;
} |
@pedrojrivera Sounds great (and matches what I read at angular/components#2481 (comment)). Before implementing the feature, I'd like to ask if we can guard the CSS code with a media query? @media print {
html.cdk-global-scrollblock {
width: initial;
position: initial;
overflow-y: initial;
}
} |
I've managed to reproduce your bug... well, sort of. In my case, the PDF viewer prints the first page (as opposed to printing the last page, as the title indicates). However, your bug fix, @pedrojrivera , repairs me bug. I hope it also fixes your bug, even though I've modified it by wrapping it in a media query. @ravikumarbggit , @pedrojrivera , and everybody reading this ticket: I'd like to hear from you. Does ngx-extended-pdf-viewer 1.7.1 solve your bug? I'm closing this ticket, but I'm still listening to this channel. Enjoy! |
@stephanrauh I tested the latest change using your media query fix. I removed the the css fixes I had and just installed the latest v1.7.1 and everything seems to work well. Thanks! |
I've went over the print CSS again. Brace yourself for breaking changes when you update to version 9.0.0. I believe I've covered your use-case, but it's hard to tell in advance. |
Print Button opens dialog with only last page. Other pages are omitted.
Version info
"ngx-extended-pdf-viewer": "^1.5.2",
Version 76.0.3809.132 (Official Build) (64-bit)
Work around:
Save the pdf file and give print externally
The text was updated successfully, but these errors were encountered: