填充不起作用TCPDF

时间:2014-09-03 18:20:54

标签: php html css tcpdf

我正在使用TCPDF将某些HTML转换为PDF。 我无法将填充放入我的表格中,我有一些边框,文字会与这些边框一起崩溃,我已经读过TCPDF不允许使用某些CSS。

此外,我无法更改表格的高度,因此我正在使用cellpadding="-1"

我的pdf。

enter image description here

enter image description here

在中间我有cellpadding="0";

那么......我怎样才能将高度设置为<tr>或者某人有一些魔术技巧用TCPDF作为填充或边距?

`

<table border="0" align="center" cellpadding="-2" cellspacing="0">
<tr>
    <td width="50%" class="marcoNegro" ><p align="center" style="font-size:8px;">
      <font size="7"><strong>Contratante</strong></font><br>
    Inversiones Accionarias Landus S. A. de C. V.</p></td>
    <td width="1%">&nbsp;</td>
    <td width="23%" class="marcoNegro"><p align="center" style="font-size:8px;"><font size="7"><strong>N&uacute;m. de certificado</strong></font><br>
    <?php  echo $rowLg->id_tabla;?></p></td>
    <td width="1%">&nbsp;</td>
    <td width="23%" class="marcoNegro"><p align="center" style="font-size:8px;"><font size="7"><strong>N&uacute;mero de p&oacute;liza</strong></font><br>
    935492</p></td>
    </tr>
</table>`

1 个答案:

答案 0 :(得分:1)

您需要使用cellpadding。您需要构建一个更复杂的结构,允许您在所需的单元格上使用cellpading。