我找到了答案。显然,html2pdf中不支持thead和tfoot。 Html2pdf将一个表放在一个数组中,并没有计算tfoot和thead,但输出了它。
他做的是这个。你有这个代码:
header
Some text longer than the text below.ApplesText shorterthan
text
aboveBananas
footer
他将每一行放在一个数组中,如下所示:
array (
0 => array (
0 => "thead"
1 => ""
1 => array (
0 => "Some text longer than the text below."
1 => "Apples"
2 => array (
0 => "Text shorter than text above"
1 => "Bananas"
3 => array (
0 => "footer"
1 => "")
然而,他只会看到2行,所以计算0和1.他将输出数组(0)和数组(1)。在那之后,他会找到桌子的其余部分并发布它,好像它只不过是带有标签的字符串,而实际上它是一个桌面。
我的解释可能是错的,这就是我捡起它的方式。