Skip to content

Commit

Permalink
#180 - Tests that a text-only table too wide after auto-layout will g…
Browse files Browse the repository at this point in the history
…enerate overflow pages.
  • Loading branch information
danfickle committed Dec 23, 2018
1 parent e6d61af commit 11f18db
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<html>
<head>
<style>
@page {
size: 150px 160px;
margin: 30px;
-fs-max-overflow-pages: 10;
-fs-overflow-pages-direction: ltr;
}
td, th {
line-height: 20px;
font-weight: normal;
}
thead th {
color: red;
}
tfoot td {
color: blue;
}

</style>
</head>
<body style="font-family: 'TestFont'; color: black; font-size: 12px;">
<table style="border-collapse: collapse; -fs-table-paginate: paginate;">
<caption>987654321</caption>
<thead>
<tr><th style="">ABCDEF</th><th style="">GHIJKL</th></tr>
</thead>
<tbody>
<tr><td style="">MNOPQR</td><td style="">STUVWXY</td></tr>
<tr><td style="">Z12345</td><td style="">678901</td></tr>
<tr><td style="">234567</td><td style="">890123</td></tr>
</tbody>
<tfoot>
<tr><td>456789</td><td>012345</td></tr>
</tfoot>
</table>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,12 @@ public void testTableNonPaginated() throws IOException {
public void testTablePaginated() throws IOException {
assertTrue(run("table-paginated"));
}

/**
* Tests that a text-only table too wide after auto-layout will generate overflow pages.
*/
@Test
public void testTableHorizPageOverflow() throws IOException {
assertTrue(run("table-horiz-page-overflow"));
}
}

0 comments on commit 11f18db

Please sign in to comment.