Skip to content

Commit

Permalink
#399 #416 Add test by @VictorAtPL for empty table header/footer issue.
Browse files Browse the repository at this point in the history
Failing currently. Thanks @VictorAtPL [ci skip]
  • Loading branch information
danfickle committed Nov 21, 2019
1 parent ae1e5df commit 884194c
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
@page {
margin: 25mm 10mm;
size: 210mm 297mm;
}
table {
width: 100%;
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>
&#160;
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
&#160;
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
&#160;
</td>
</tr>
</tfoot>
</table>
<table>
<thead>
<tr>
<td>
&#160;
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
&#160;
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
&#160;
</td>
</tr>
</tfoot>
</table>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,18 @@ public void testMissingHtml5BlockElements() throws IOException {
assertTrue(vt.runTest("html5-missing-block-elements"));
}

/**
* Tests that a paginated table doesn't add header and footer with no rows
* on a page.
* https://github.com/danfickle/openhtmltopdf/issues/399
*/
@Test
@Ignore // Failing for now.
public void testIssue399TableHeaderFooterWithNoRows() throws IOException {
assertTrue(vt.runTest("issue-399-table-header-with-no-rows"));
}


// TODO:
// + Elements that appear just on generated overflow pages.
// + content property (page counters, etc)
Expand Down

0 comments on commit 884194c

Please sign in to comment.