我正在使用 TCPDF 将一些 HTML 转换为 PDF。 我无法在我的表格中添加填充,我有一些边框,文本会随着这些边框折叠,我读到 TCPDF 不允许使用某些 CSS。
此外,我无法更改表格的高度,因此我正在使用 cellpadding="-1"
这是我的 pdf。
在中间我有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%"> </td>
<td width="23%" class="marcoNegro"><p align="center" style="font-size:8px;"><font size="7"><strong>Núm. de certificado</strong></font><br>
<?php echo $rowLg->id_tabla;?></p></td>
<td width="1%"> </td>
<td width="23%" class="marcoNegro"><p align="center" style="font-size:8px;"><font size="7"><strong>Número de póliza</strong></font><br>
935492</p></td>
</tr>
</table>`
最佳答案
你需要使用 cellpadding。您需要构建一个更复杂的结构,允许您在所需的单元格上使用单元格填充。
关于php - 填充不起作用 TCPDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25651116/