TCPDF并排表
我正在使用TCPDF打印一些文档记录。但我的第二个表总是在第一个表的底部(就像图像一样)。我需要让第二个在第一个表的左侧。任何代码战士请......:)
I'm using TCPDF to print some document record. But my second table will always next to the bottom of the first table (just like the image). I need to make the second is on the left side of the first table. Any code warrior please ... :)
这是我到目前为止的代码...
Here's my code so far ...
如果你想要一个并排的表,你必须创建一个宽度为100%的父表和一对tr和2对 td和,在每个td上制作另一张桌子。以下是草稿:
If you want to have a table side-by-side, you have to create a parent table where the width is 100% and the one pair of "tr" and 2 pairs of "td" and, on each of "td" make another table. Here is the draft:
<table width="100%" cellpadding="0" border="0">
<tr>
// Left side Table
<td width="50%">
<table width="100%" border="1">
<tr><td>Data goes here</td></tr>
</table>
</td>
// Right side Table
<td width="50%">
<table width="100%" border="1">
<tr><td>Data goes here</td></tr>
</table>
</td>
</tr>
</table>
看来你每组使用writeHTML,为什么不使用一个并将父表应用于两个孩子表,你只需要使用concat。
It seems your using writeHTML per group, why not just use one and apply the parent table with two child table, you just have to use concat.