2014-09-03 82 views
0

我正在使用TCPDF将一些HTML转换为PDF。 我不能把填充到我的表中,我有一些边框和文本崩溃的边界,我读过TCPDF不允许一些CSS。填充不起作用TCPDF

我也不能更改表的高度,所以我用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>` 
+0

尝试添加充当填充的白色边框。他们在电子邮件中工作得很好,我猜这也可以在这里完成。你可以做到这一点,而不是你的tr和td的 – dward 2014-09-03 18:21:40

+0

你可以发布你正在使用的html,同样适用于你的css – Allan 2014-09-03 18:23:42

回答

0

您需要使用的cellpadding。您需要构建更复杂的结构,以便您可以在所需单元上使用细胞移植。

+2

不用担心,我的时间机器很快就会准备就绪。 – 2016-11-28 16:32:42