Open PaulWGraham opened 9 years ago
I'm not sure the line you removed would have anything to do with the bisection you are talking about, though altering the default width and padding may solve the problem by accident.
You may be able to solve the problem through careful injection of
element {
page-break-inside: avoid;
}
...but I'd need to play around these values to find the best practice. Simply applying this style to *
may break some designs.
I have the same issue, some of my generated PDFs get bisected horizontally.
Sometime when creating PDFs using messageToPdf(messages,{embedAvatar:false}) the PDF generated contains lines of text that are bisected horizontally (see attached screenshot) and split between two pages in the PDF.
Note:
Removing the body{padding:0 10px;min-width:' + opts.width + 'px;-webkit-print-color-adjust: exact;} CSS declarations seems to prevent this issue (but obviously at a cost).