Skip to content

Instantly share code, notes, and snippets.

@VictorAtPL
Last active November 20, 2019 16:36
Show Gist options
  • Save VictorAtPL/82e035e5f4e306aa692cb206d6624347 to your computer and use it in GitHub Desktop.
Save VictorAtPL/82e035e5f4e306aa692cb206d6624347 to your computer and use it in GitHub Desktop.
MWE of openhtmltopdf table paginate bug
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
@page {
margin: 25mm 10mm;
size: 210mm 297mm;
}
table {
border: 1px solid black;
-fs-table-paginate: paginate;
}
table tbody tr {
page-break-inside: avoid;
background-color: orange;
}
table thead tr {
background-color: red;
}
table tfoot tr {
background-color: blue;
}
table tbody tr td {
height: 450px;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<td>
H
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
R1
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
F
</td>
</tr>
</tfoot>
</table>
<table>
<thead>
<tr>
<td>
H
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
R1
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
F
</td>
</tr>
</tfoot>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment