danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!

Home Page:https://danfickle.github.io/pdf-templates/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

text-align: justify; and <br/>

fcorneli opened this issue · comments

The following example demonstrates an issue with text-align: justify; and <br/>.

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <style>
            body {
                text-align: justify;
            }
        </style>
        <title>test</title>
    </head>
    <body>
        <p>
            hello world<br/>
            hello
        </p>
        <p style="text-align: left;">
            hello world<br/>
            hello
        </p>
    </body>
</html>

The <br/> element should not trigger a justify on its line. The two paragraphs should look exactly the same. The original Flying Saucer does not have this issue.