Closed 1nutzername closed 2 years ago
Thanks for providing a reproducer!
When you open your file on https://pdfviewer.net/extended-pdf-viewer/simple, there's no extra page in the print preview. I haven't seen the offending CSS rule yet, but judging from previous error reports, I'm 95% sure it's a CSS problem hidden somewhere in your project.
I'm confused. I've counted the CSS rules of your project. I ended up with zero. Adding insult to injury, I can reproduce the extra page with a fresh project (ng new
+ ng add ngx-extended-pdf-viewer
).
As it turns out, the additional page seems to be caused of the width of your demo document. It seems to be a tiny fraction too wide. I've added this rule to the global styles.css
, and it solves the problem:
body[data-pdfjsprinting] #printContainer>.printedPage {
width: 99.99% !important;
}
Hello, I tested this solution in our production code and it works flawless. Thanks a lot for investigation! :)
Describe the bug The print view adds an additional blank page.
Version info
Desktop (please complete the following information):
To Reproduce I created a demo project with Angular 12 and latest version 12 of the viewer: Demo repo
Just click the Button to activate the viewer and the printing screen.
Screenshots
Thanks a lot for having a look :)
BR i7i5