TCPDF: HTML table and page breaks

Koney picture Koney · May 1, 2011 · Viewed 55k times · Source

I am creating a large HTML table and I have problem with page breaks as you can see in the following image:
enter image description here
Is there a method settle down the problem automatically? Or what is the way to do it?

Answer

FastTrack picture FastTrack · Oct 2, 2012

Try adding this to your <tr> tags: nobr="true".

So a quick example would be:

<table>
    <tr nobr="true">
        <td>Test</td>
        <td>Test 2</td>
    </tr>
</table>

The nobr="true" prevents the table rows from ever breaking apart. You can also put this on <td> and <th> tags.