Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Padding isn't working TCPDF

Tags:

html

css

php

tcpdf

I'm working with TCPDF to convert some HTMLto PDF. I can't put padding into my table, I have some borders and the text collapse with those borders, I've read that TCPDF doesn't allow some CSS.

Also I can't change the height of the table, so I'm working with cellpadding="-1"

There's my pdf.

enter image description here

enter image description here

in the middle I have cellpadding="0";

So... How can I set height to a <tr> or someone have some magic trick with TCPDF for a padding or margin?

`

<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>`
like image 893
zickno Avatar asked Aug 03 '26 03:08

zickno


1 Answers

You need to use cellpadding. You need to build a more complex in structure which allows you to use cellpading on desired cells.

like image 128
Vali Munteanu Avatar answered Aug 05 '26 18:08

Vali Munteanu