2014-09-03 85 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