我正在使用TCPDF生成PDF文档。我的问题是,我试图添加一个不同的页脚每页。显然,TCPDF只为单个页脚提供了解决方案。
每个页脚只包含基本的html代码,没有任何样式。
有什么想法吗?
发布于 2015-02-04 22:29:38
您可以像这样关闭默认页脚:
$pdf->SetPrintFooter(false);如下所示创建您自己的脚本:
$footer = 'yau man footer stuff';然后创建您自己的页脚函数:
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);您可以创建自己的页脚
https://stackoverflow.com/questions/26658186
复制相似问题