diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/expected/issue-543-nbsp-justify.pdf b/openhtmltopdf-examples/src/main/resources/visualtest/expected/issue-543-nbsp-justify.pdf new file mode 100644 index 000000000..7cce326e0 Binary files /dev/null and b/openhtmltopdf-examples/src/main/resources/visualtest/expected/issue-543-nbsp-justify.pdf differ diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-543-nbsp-justify.html b/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-543-nbsp-justify.html new file mode 100644 index 000000000..1f25e53bd --- /dev/null +++ b/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-543-nbsp-justify.html @@ -0,0 +1,27 @@ + + + + + + + +
+ CERTIFICATE registered under nº                , page         , in book nº        , process nº +
+ + + diff --git a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java index ff80efb9a..524e3c9d1 100644 --- a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java +++ b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java @@ -1217,6 +1217,14 @@ public void testIssue474NpeImageDecoding() throws IOException { assertTrue(vt.runTest("issue-474-npe-image-decoding")); } + /** + * Tests that text justification works with nbsp. + */ + @Test + public void testIssue543NonBreakingSpaceJustify() throws IOException { + assertTrue(vt.runTest("issue-543-nbsp-justify")); + } + @Test public void testBarcode() throws IOException { diff --git a/openhtmltopdf-pdfbox/pom.xml b/openhtmltopdf-pdfbox/pom.xml index a9ffd99e3..9afd5da9e 100644 --- a/openhtmltopdf-pdfbox/pom.xml +++ b/openhtmltopdf-pdfbox/pom.xml @@ -119,7 +119,7 @@ - 2.0.21 + 2.0.20