hotfix pagebreak
This commit is contained in:
@@ -530,12 +530,26 @@ function printStyles(cssSize, pageWidthMm, pageHeightMm, marginMm, preserveColor
|
||||
}
|
||||
|
||||
.pdf-content .pdf-keep-unit {
|
||||
/*
|
||||
* Chromium can leave a 1-2 px fragment of an avoided block on the
|
||||
* previous page before moving the real block to the next page.
|
||||
* Making the keep unit an atomic inline-block prevents that ghost
|
||||
* fragment while preserving book-like pagination.
|
||||
*/
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
box-sizing: border-box;
|
||||
break-inside: avoid-page;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
.pdf-content .pdf-keep-unit > :first-child { margin-top: 0 !important; }
|
||||
.pdf-content .pdf-keep-unit > :last-child { margin-bottom: 0 !important; }
|
||||
.pdf-content .pdf-atomic-visual {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
box-sizing: border-box;
|
||||
break-before: avoid-page;
|
||||
page-break-before: avoid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user