mPDF:表td中的长文本缩小为小尺寸 [英] mPDF: long text in table td shrinks to small size

查看:472
本文介绍了mPDF:表td中的长文本缩小为小尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将整个html发布到mpdfp.它工作正常.但是,当表中的内容更多或(td)列中有电子邮件地址或网站名称时,文本的字体大小将缩小为不可读的字体.一定是什么问题?请帮忙.检查附件中的图像是否有问题.

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.

谢谢

推荐答案

此问题中指出: mPDF会自动减小表格中的字体大小.在config.php$this->shrink_tables_to_fit变量中设置了最大收缩率.可以通过以下方式关闭/设置不同的

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">

变量的默认值为1.4.

Default value for the variable is 1.4.

另请参见mPDF手册的表格部分 https://mpdf.github.io/table/tables.html#autosize

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

这篇关于mPDF:表td中的长文本缩小为小尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆