【问题标题】:FPDF in PHP, setX just indents first rowPHP中的FPDF,setX只是缩进第一行
【发布时间】:2010-04-01 09:38:18
【问题描述】:

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

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

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

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

【问题讨论】:

    标签: php text textbox fpdf


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多