mPDF: long text in table td shrinks to small size

前端 未结 1 1137
星月不相逢
星月不相逢 2021-01-22 06:55

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 t

1条回答
  •  粉色の甜心
    2021-01-22 07:35

    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:

    Default value for the variable is 1.4.

    Also see Tables section of mPDF manual https://mpdf.github.io/tables/tables.html#autosize

    0 讨论(0)
    提交回复
    热议问题