首页 文章

mPDF会删除列的内容

提问于
浏览
1

第一个代码:

$mpdf = new MPDF('','',0,'',15,15,5,5);

$mpdf->AddPage('P','A4'); 
$mpdf->SetColumns(2,'',1); 

$mpdf->WriteHTML('
<table style="width:326px;background:none;border-width:1px;border-style: dotted;border-color:grey;padding:8px;">  
   <tr>
   <td>
....the contents of the table number 1.....
 </td>
 </tr>
 </table>

', 0);     

$mpdf->WriteHTML('
<table style="width:326px;background:none;border-width:1px;border-style: dotted;border-color:grey;padding:8px;">  
   <tr>
   <td>
....the contents of the table number 2.....
 </td>
 </tr>
 </table>

', 0);

我想生成一个基于PDF的表单php . 最终,要在表中显示的数据,每个表都将包含循环的记录 . 因此,显示将是多少个表,多少条记录 . 我无法与显示表达成协议 . 我希望它们一个接一个地显示在两列中,从上到下,A4页上有四个表格 . 此时显示左列中的表1,右侧显示2个表(右列中不响应上边距) . table 是这样的高度,可以垂直地固定两个 . 是mPDF吗?请帮忙!见下面的照片

enter image description here

1 回答

  • 0

    找到解决方案不破表使用style =“page-break-inside:avoid;”但是它显示了单个col中的循环表 . 但我也希望在两个col中显示,得到任何解决方案然后pl分享..

相关问题