【发布时间】:2018-07-20 21:55:34
【问题描述】:
我正在使用 TCPDF 库在我的项目中生成 pdf 文档。问题是我想在 pdf 中制作角落功能区(如图所示),但没有做到这一点,网络中可用的示例使用 css 制作,它们在 pdf 中不适合我。
【问题讨论】:
-
使用绝对位置规则。
标签: php css codeigniter pdf tcpdf
我正在使用 TCPDF 库在我的项目中生成 pdf 文档。问题是我想在 pdf 中制作角落功能区(如图所示),但没有做到这一点,网络中可用的示例使用 css 制作,它们在 pdf 中不适合我。
【问题讨论】:
标签: php css codeigniter pdf tcpdf
你必须像这样设置坐标 x,y
$x = $pdf->GetX();
$y = $pdf->GetY();
$col1 = "p.p Inmobiliaria xxxxxxxx \n Roxxxxx \n xxxx: xxxxxxx";
$col2 = "" . $nombre . " \n Rut: " . $rut . " \n Comprador";
$pdf->Image('firma.png', $x + 10, $y - 40, 0, 0);
$pdf->MultiCell(80, 6, $col1, 0, 1);
$pdf->SetXY($x + 120, $y);
【讨论】: