3

我正在使用 fpdf 库从 php 代码制作一些 pdf 文档。在那个文档中,我创建了两个这样的单元格

    $pdf->Cell(100,100,"Text inside first column",1,0,'L');
    $pdf->Cell(35,35,'Text inside second column ',1,0,'C');

上面的代码运行良好,输出有两个单元格,第一个单元格的大小为 100x100 ,第二个单元格的大小为 35x35 ,第二个单元格正好位于第一个单元格。

但我需要在第一个单元格内打印第二个卖点 fpdf 有什么办法吗?谁能帮我?

4

2 回答 2

1

我不确定你到底想要什么,但也许这个插件可以帮助你做到这一点:

http://www.interpid.eu/fpdf-table

另一种方法是移动指针,如下所示:

$pdf->Cell(100,100,"Text inside first column",1,0,'L');
$pdf->SetX($pdf->GetX() - 35);
$pdf->Cell(35,35,'Text inside second column ',1,0,'C');
于 2012-04-12T13:13:20.223 回答
0

在嵌套单元格 X 轴和 Y 轴中,我已经实现了这样

`$pdf->Cell(190,20,"",1,0,'L');
$pdf->SetX($pdf->GetX() - 189);
$pdf->Cell(100,10,'First ',2,0,'L');

$pdf->Cell(90,10,'March/2020 ',2,0,'R');
$pdf->SetY($pdf->GetY() +5);
$pdf->Cell(100,10,'MCB,UBl Omni, HBL Konnect, Alfalah , Mobi Cash ',2,0,'L');
$pdf->SetY($pdf->GetY() +5);`enter code here`
$pdf->Cell(139,10,'third text he`enter code here`re ',2,0,'L');
$pdf->Cell(50,10,'Lahore',2,0,'R');`
于 2020-06-28T05:13:39.453 回答