TCPDF允许您编写HTML.这样,您的表结构无关紧要.
例:
$tbl = <<<EOD <table border="1"> <tr> <th rowspan="3">Left column</th> <th colspan="5">heading Column Span 5</th> <th colspan="9">heading Column Span 9</th> </tr> <tr> <th rowspan="2">Rowspan 2<br />This is some text that fills the table cell.</th> <th colspan="2">span 2</th> <th colspan="2">span 2</th> <th rowspan="2">2 rows</th> <th colspan="8">Colspan 8</th> </tr> <tr> <th>1a</th> <th>2a</th> <th>1b</th> <th>2b</th> <th>1</th> <th>2</th> <th>3</th> <th>4</th> <th>5</th> <th>6</th> <th>7</th> <th>8</th> </tr> </table> EOD; $pdf->writeHTML($tbl,true,false,'');
原文地址:https://www.jb51.cc/php/133993.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。