First time use TCPDF, great library.
I try to create a custom footer, however i want to create a custom footer that include the page number and date inside a div with to
You can extend the TCPDF
class and add your custom Footer
function. Here's an example that I've used, see if it fits and modify to your own needs. It doesn't use a class MyPDF extends TCPDF {
public function Footer() {
$this->SetY(-15);
$this->SetFont('helvetica', 'I', 8);
$this->Cell(0, 10,
'Page ' . $this->getAliasNumPage() . ' of total ' .
$this->getAliasNbPages(), 0, false, 'C', 0, '',
0, false, 'T', 'M');
}
public function Header() {
// add custom header stuff here
}
}
$pdf = new MyPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT,
true, 'UTF-8', false);