TCPDF:HTML 表格和分页符 [英] TCPDF: HTML table and page breaks

查看:80
本文介绍了TCPDF:HTML 表格和分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个大型 HTML 表格,但我遇到了分页符问题,如下图所示:

有没有办法自动解决问题?或者有什么方法可以做到?

解决方案

尝试将其添加到您的 标签:nobr="true".

一个简单的例子是:

<tr nobr="true"><td>测试</td><td>测试2</td></tr>

nobr="true" 可防止表格行分开.你也可以把它放在 标签上.

I am creating a large HTML table and I have problem with page breaks as you can see in the following image:

Is there a method settle down the problem automatically? Or what is the way to do it?

解决方案

Try adding this to your <tr> tags: nobr="true".

So a quick example would be:

<table>
    <tr nobr="true">
        <td>Test</td>
        <td>Test 2</td>
    </tr>
</table>

The nobr="true" prevents the table rows from ever breaking apart. You can also put this on <td> and <th> tags.

这篇关于TCPDF:HTML 表格和分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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