'How to split text into another page if the text is large in table?

My code looks like this:

$html = '<table style="width: 793px; overflow: wrap" autosize="1">
   <tr>
       <td>small text</td>
       <td>large text</td>
   </tr>
   <tr>
       <td>small text</td>
       <td>large text</td>
   </tr>
</table';

$mpdf = new Mpdf();
$mpdf->shrink_tables_to_fit = 1;
$mpdf->WriteHTML($html);

I don't know why, but mpdf tries to put one TR on one page. But if text is large in TD, mpdf automatically resizes the font size to very small. I need to split my text on two pages without changing the font size.



Solution 1:[1]

This is documented behaviour:

Note: mPDF will always resize tables if it is the only way to fit a row or whole table onto a full page.

Split large text to multiple rows if you need it to span between pages. Or don't use tables.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Finwe