【问题标题】:Padding isn't working TCPDF填充不起作用 TCPDF
【发布时间】:2014-10-28 08:31:39
【问题描述】:

我正在使用 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%">&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>`

【问题讨论】:

  • 尝试添加白色边框作为填充。他们在电子邮件中工作得很好,我猜也可以在这里完成。你可以对 div 而不是你的 tr 和 td 这样做
  • 你能发布你正在使用的html吗,你的css也是如此

标签: php html css tcpdf


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2020-06-25
    • 2018-01-19
    • 2012-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-18
    • 2014-12-19
    相关资源
    最近更新 更多