如何在tcpdf中添加页脚

时间:2014-07-15 06:15:11

标签: pdf footer tcpdf

我正在使用tcpdf库生成pdf,我必须在页脚中添加一个右侧文本,但所有文本都在一行打印,只有中间部分可见我正在使用

$htmlbody="Copyright © 2014 XYZ. All rights reserved. Specifications subject to change"
                        . " without notice. XYZ and the XYZ logo are trademarks or registered trademarks"
                        . " of XYZ. All other trademarks used or mentioned herein belong to their respective owners";
        $this->Cell(100, 10, $htmlbody , 0, false, 'C', 0, '', 0, false, 'T', 'M');

生成的pdf看起来像这样 enter image description here

1 个答案:

答案 0 :(得分:0)

对于多行文字,您可以使用MultiCell()

$this->MultiCell(100, 0, $htmlbody."\n", 0, 'C');