Reputation: 1166
I am currently trying to print a page on IE11, however when the Print Preview is shown there is always a blank page as the first page. This is in my css code below. This first blank page doesn't show up in the Chrome print preview however.
@media print {
html, body {
height: 99%;
}
#noprint{
display: none !important;
visibility: hidden;
}
.page-break
{
page-break-after: always;
}
.last-page{
page-break-after: avoid;
}
}
Upvotes: 2
Views: 1064
Reputation: 380
I had the same problem. It appears that the tr element automatically has page-break-inside: avoid. So, I added
tr {
page-break-inside: auto;
}
and it helped.
Upvotes: 1
Reputation: 719
I encountered the same issue in both Edge and IE whenever I put page-break-after: always
on the divs involved. Had a hard time investigating until recently, I decided to review the rendered HTML tag by tag.
The issue was fixed by replacing the display: flex
into display: block
on all parent div
tags.
Upvotes: 0