mPDF font-size not working for long text in a table

前端 未结 2 1894
慢半拍i
慢半拍i 2020-12-16 16:50

Using mPDF to print html to pdf the font-size I set in html is not properly set in creating the pdf. In my html I have

相关标签:
2条回答
  • 2020-12-16 16:55

    If anyone still got the same issue after tested with accepted answer, try this :

    <table style="overflow: wrap" autosize="1">
    

    And

    $mPdf->shrink_tables_to_fit = 1;
    

    Hope this helped as my case was solved only with these combination

    0 讨论(0)
  • 2020-12-16 17:07

    mPDF uses autosizing tables and this influences, among other things, the font-size as well. When outputting tables with mPDF you need to set:

    <table style="overflow: wrap">
    

    on every table. See Auto-layout algorithm in the mPDF manual for reference.

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