我需要在每页的最底部附上页脚.我使用tcpdf生成pdf.我在谷歌尝试了很多解决方案,但没有找到任何运气.我目前的框架是yii,我正在使用tcpdf扩展.
例如,你需要在你的类中编写Footer方法
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2584 次 |
| 最近记录: |