3

我使用 FPDF 从 PHP 创建 PDF,但 Write() 函数有问题

我使用以下代码,我想缩进文本块而不仅仅是第一行:

$pdf->SetX(60);
$pdf->Write(5,'' . str_repeat( ' This is a test of setX.', 30 ));

但是你可以理解它只是缩进第一行,关于如何移动整个文本 mas 的任何想法?

4

1 回答 1

6

一种解决方案是使用 MultiCell insted of Write:

$pdf->SetX(60);    
$pdf->MultiCell(60, 6, '' . str_repeat( ' This is a test of setX.', 30 ));
于 2010-04-01T11:29:08.203 回答