首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TCPDF多页脚

TCPDF多页脚
EN

Stack Overflow用户
提问于 2014-10-31 00:20:11
回答 1查看 1.4K关注 0票数 0

我正在使用TCPDF生成PDF文档。我的问题是,我试图添加一个不同的页脚每页。显然,TCPDF只为单个页脚提供了解决方案。

每个页脚只包含基本的html代码,没有任何样式。

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2015-02-04 22:29:38

您可以像这样关闭默认页脚:

代码语言:javascript
复制
$pdf->SetPrintFooter(false);

如下所示创建您自己的脚本:

代码语言:javascript
复制
$footer = 'yau man footer stuff';

然后创建您自己的页脚函数:

代码语言:javascript
复制
public function _footer($input) {
    $text = $input;

    $pdf->setY(-15); // or whatever location your footer should be displayed.

    $pdf->Cell ( // or another method like Write(), WriteHTML() ..
        $width = 0, // width of the cell, not the input
        $height = 0, // height of the cell..
        $x,
        $y,
        $text = '', // your input.
        $border = 0,
        $ln = 0,
        $fill = false,
        $reseth = true,
        $align = '',
        $autopadding = true 
    );
}

通过调用$pdf->_ footer ($footer);您可以创建自己的页脚

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26658186

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档