我正在使用FPDF生成报告。
我有相当多的数据,我想放在我的页脚。即三人的姓名和签名
我希望它在多条线上。
问题:它一直被推到焦点之外。不到下一页,但一旦它到达页面底部附近,我就看不到它了。
此外,如果显示,则仅在页面末尾显示一次。。。
如何增加页脚的大小?
这是我页脚的代码
function Footer() {
$date=date(' jS F Y ');
$this->Cell(-28,150,$date,10,0,'C');
$this->Cell(-190,150,$date,10,0,'C');
$this->Cell(-50,150,$date,10,0,'C');
$this->Cell(75,130,'The Village Market Representative',10,0,'C');
$this->Cell(195,130,'Betting Control and licensing Board Representative',10,0,'C');
$this->Cell(-55,130,'Witness',10,0,'C');
}
我该如何做到这一点,使它出现在每一页上,而不会使我的页脚偏离焦点?
在写出单元格之前,尝试使用setY()将光标位置设置在页面底部上方:
function Footer() {
$this->setY(-30);
$date=date(' jS F Y ');
$this->Cell(-28,150,$date,10,0,'C');
$this->Cell(-190,150,$date,10,0,'C');
$this->Cell(-50,150,$date,10,0,'C');
$this->Cell(75,130,'The Village Market Representative',10,0,'C');
$this->Cell(195,130,'Betting Control and licensing Board Representative',10,0,'C');
$this->Cell(-55,130,'Witness',10,0,'C');
}
我在网上看到的大多数例子都是用setY()设置页脚使用(-15),但这似乎总是把页脚推到下一页,所以我把负值设置得更高。负值设置基于页面底部的Y位置。