php - 填充不起作用 TCPDF

标签 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>`

最佳答案

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

关于php - 填充不起作用 TCPDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25651116/

相关文章:

php - 递归函数查找MySQL表的所有依赖项

CSS 3 背景不工作

jquery - 在鼠标悬停时在图像中心显示图标

css - 调整大小以适合 div 中的图像,并水平和垂直居中

php - 我可以在 CodeIgniter 2.1 中 __destruct() 库对象吗?

php - 安装 PHP 7 MongoDB 客户端/驱动程序?

php - 如何在 Doctrine 2 中获取类而不是数组

javascript - 使用 svg 格式的 D3.js 预渲染饼图服务器时出错

javascript - 无法在文本字段中提供 "dot"输入

html - 将文本对齐到全宽和相等的自动间距