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)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.93k stars 359 forks source link

Wrong overflow direction #919

Open kenneth-apuyan opened 1 year ago

kenneth-apuyan commented 1 year ago

Given this html code:

<table>
 <tbody>
<tr>
<td style="border:1px solid black;">
<div style="width:40px;white-space:nowrap;float:left;" align="center"> 
11111
</div>
</td>
<td style="border:1px solid black;">
<div style="width:40px;white-space:nowrap;float:left" align="center"> 
2222222222222222
</div>
</td>
</tr>
</tbody>
</table>

When using openhtmltopdf, it overflows on both left and right direction, which it shouldn't because of the float:left in the div.

openhtmltopdf sandbox image

w3schools sandbox image