diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/expected/text/table-horiz-page-overflow.pdf b/openhtmltopdf-examples/src/main/resources/visualtest/expected/text/table-horiz-page-overflow.pdf new file mode 100644 index 000000000..aa15bae9f Binary files /dev/null and b/openhtmltopdf-examples/src/main/resources/visualtest/expected/text/table-horiz-page-overflow.pdf differ diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/html/text/table-horiz-page-overflow.html b/openhtmltopdf-examples/src/main/resources/visualtest/html/text/table-horiz-page-overflow.html new file mode 100644 index 000000000..f0723ba30 --- /dev/null +++ b/openhtmltopdf-examples/src/main/resources/visualtest/html/text/table-horiz-page-overflow.html @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + +
987654321
ABCDEFGHIJKL
MNOPQRSTUVWXY
Z12345678901
234567890123
456789012345
+ + diff --git a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java index b4cb186d9..3043c7af4 100644 --- a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java +++ b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java @@ -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")); + } }