tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.18k stars 1.51k forks source link

HTML table cells have wrong width after column break in writeHTML method #729

Open nikolaradivojevic opened 3 months ago

nikolaradivojevic commented 3 months ago

In multicolumn document layout after column break html table cells have wrong width in writeHTML method.

html example:

<table cellpadding="0" border="0">
   <tr>
      <td style="width:15mm; background-color: #ff0000;">Lorem ipsum dolor sit amet ... nibh aliquam eget.</td>
      <td style="width:35mm; background-color: #00ff00;">Lorem ipsum dolor sit amet ... nibh aliquam eget.<td>
      <td style="width:15mm; background-color: #0000ff;">Lorem ipsum dolor sit amet ... nibh aliquam eget.</td>
   </tr>
</table>

PDF document look: Screenshot 2024-06-20 at 17 23 34

As you can see in the left document column everything is perfect, but in the right one every td is ended at page end ignoring width property set in html.