Skip to content

Commit

Permalink
#364 Failing test for paginated table with footnotes.
Browse files Browse the repository at this point in the history
Table footer is overlapping footnote area.
  • Loading branch information
danfickle committed Jun 20, 2021
1 parent 312e7a1 commit d1a814e
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<html>
<head>
<style>
@page {
size: 300px 300px;
}
@page {
@footnote {
float: bottom;
box-sizing: border-box;
width: 100%;
border-top: 3px solid blue;
}
}
body {
margin: 0 10px;
padding: 3px;
border: 1px solid black;
font-size: 18px;
}
::footnote-call {
counter-increment: footnote;
}
span.footnote {
float: footnote;
}
.footnote::footnote-call {
content: "[" counter(footnote) "]";
}
.footnote::footnote-marker {
content: counter(footnote) ". ";
}
table {
width: 100%;
font-size: 16px;
border-collapse: collapse;
-fs-table-paginate: paginate;
}
</style>
</head>
<body>

<table>

<thead>
<tr><th>Title 1</th><th>Title 2</th></tr>
</thead>

<tbody>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World! <span class="footnote">Footnote one</span></td></tr>
<tr><td>Hello <span class="footnote">Footnote two</span></td><td>World!</td></tr>
<tr><td>Hello</td><td>World! <span class="footnote">Footnote three</span></td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello <span class="footnote">Footnote four</span></td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!<span class="footnote">Footnote five</span></td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
<tr><td>Hello</td><td>World!</td></tr>
</tbody>

<tfoot>
<tr><td>Footer 1</td><td>Footer 2</td></tr>
</tfoot>

</table>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,13 @@ public void testIssue364FootnotesTooLarge() throws IOException {
public void testIssue364FootnotesBlocks() throws IOException {
assertTrue(vt.runTest("issue-364-footnotes-blocks"));
}

/**
* Tests paginated table head/footer is placed in the right place in the
* presence of footnotes.
*/
@Test
public void testIssue364FootnotesPaginatedTable() throws IOException {
assertTrue(vt.runTest("issue-364-footnotes-paginated-table"));
}
}

0 comments on commit d1a814e

Please sign in to comment.