问题
I am posting an entire html to mpdfp. It works fine. But when the content in table is more or there is an email address or website name in the column (td) the font size of the text shrinks to unreadable font. What must be the issue? Please help on this. Check the attached image for the issue.
Thanks回答1:
As noted in this question: Text becomes small when string is too large in MPDF
mPDF automatically reduces font size in tables. There is a maximum shrink factor set in $this->shrink_tables_to_fit
variable in config.php
. It can be turned off / set differently with
$mpdf->shrink_tables_to_fit=0;
in config.php
or with providing an extra parameter to the opening table tag:
<table autosize="1">
Default value for the variable is 1.4.
Also see Tables section of mPDF manual https://mpdf.github.io/tables/tables.html#autosize
来源:https://stackoverflow.com/questions/22268408/mpdf-long-text-in-table-td-shrinks-to-small-size