From 1319ded95f803c228a93c481b1966b60f34cde22 Mon Sep 17 00:00:00 2001 From: Emmeran Seehuber Date: Tue, 22 May 2018 08:48:12 +0200 Subject: [PATCH] #80 Example how to output different HTML files into the same PDF document. (cherry picked from commit e7daf36) --- .../testcases/TestcaseRunner.java | 2 +- .../testcases/FSPageBreakMinHeightSample.html | 10 +++- .../testcases/ConcateOutputTest.java | 59 +++++++++++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 openhtmltopdf-examples/src/test/java/com/openhtmltopdf/testcases/ConcateOutputTest.java diff --git a/openhtmltopdf-examples/src/main/java/com/openhtmltopdf/testcases/TestcaseRunner.java b/openhtmltopdf-examples/src/main/java/com/openhtmltopdf/testcases/TestcaseRunner.java index 090ea8250..c3acd9a5d 100644 --- a/openhtmltopdf-examples/src/main/java/com/openhtmltopdf/testcases/TestcaseRunner.java +++ b/openhtmltopdf-examples/src/main/java/com/openhtmltopdf/testcases/TestcaseRunner.java @@ -192,7 +192,7 @@ private static void renderPDF(String html, OutputStream outputStream) throws Exc } } - private static DefaultObjectDrawerFactory buildObjectDrawerFactory() { + static DefaultObjectDrawerFactory buildObjectDrawerFactory() { DefaultObjectDrawerFactory objectDrawerFactory = new StandardObjectDrawerFactory(); objectDrawerFactory.registerDrawer("custom/binary-tree", new SampleObjectDrawerBinaryTree()); return objectDrawerFactory; diff --git a/openhtmltopdf-examples/src/main/resources/testcases/FSPageBreakMinHeightSample.html b/openhtmltopdf-examples/src/main/resources/testcases/FSPageBreakMinHeightSample.html index a34e80b7d..40f05b391 100644 --- a/openhtmltopdf-examples/src/main/resources/testcases/FSPageBreakMinHeightSample.html +++ b/openhtmltopdf-examples/src/main/resources/testcases/FSPageBreakMinHeightSample.html @@ -1,5 +1,13 @@ + + + + + + + +