I am trying to make a table printable, specifically never have it break a <td>
entry in half, while maintaining proper borders. I am trying this:
@media print {
table.print-friendly tr td, table.print-friendly tr th {
page-break-inside: avoid;
}
}
However, this still causes a problem where the table data is missing upper or lower margins. Actually, I am not sure it does anything, because without it, the table misses the last margin on the first page. Easier to explain with an image here:
Plnkr here. Everything relevant is in index.html - I think you need to copy it to notepad and run locally to test printing. Note that the only relevant things in that code are the <style>
definitions and the table classes.
To summarize - my goal is to make the table break properly AND maintain margins on print.