openhtmltopdf
openhtmltopdf copied to clipboard
Display inline-block works unexpected
Hi,
I've discovered that css display inline-block breaks test befere last word.
Code example:
<html>
<head>
</head>
<body>
<div style="display: inline-block;">
aaaaa bbbbb cccc dddd eeeee
</div>
</body>
</html>
Pdf result:
Browser result:
Somehow after hours of debugging, if I comment this line it works well; https://github.com/danfickle/openhtmltopdf/blob/open-dev-v1/openhtmltopdf-core/src/main/java/com/openhtmltopdf/render/BlockBox.java#L2081
I will inspect futher.
What is quite strange its seems to have "display inline" value.
I am experiencing the same problem with inline-block
-tables.
I am using openhtmltopdf to convert E-Mails into PDFs, in some cases I have HTML like:
<table>
<tr>
<td>
<table style="display: inline-block;width:345px">...</table>
<table style="display: inline-block;width:35px">...</table>
<table style="display: inline-block;width:315px">...</table>
</td>
</tr>
</table>
Each table gets rendered into a separate row instead of a single one which malforms the whole HTML-structure.