function theme_print_pdf_tcpdf_footer2 in Printer, email and PDF versions 5.3
Same name and namespace in other branches
- 5.4 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_footer2()
- 6 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_footer2()
- 7.2 print_pdf/lib_handlers/print_pdf_tcpdf/print_pdf_tcpdf.pages.inc \theme_print_pdf_tcpdf_footer2()
- 7 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_footer2()
- 5.x print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_footer2()
Format the TCPDF footer layout
Parameters
$pdf: current TCPDF object
See also
theme_print_pdf_tcpdf_footer2()
2 theme calls to theme_print_pdf_tcpdf_footer2()
- PrintTCPDF::Footer in print_pdf/
print_pdf.class_php4.inc - PrintTCPDF::Footer in print_pdf/
print_pdf.class.inc
File
- print_pdf/
print_pdf.pages.inc, line 345
Code
function theme_print_pdf_tcpdf_footer2(&$pdf) {
//Position at 1.5 cm from bottom
$pdf
->writeHTMLCell(0, 15, 15, 0, $pdf->footer, 0, 0, 0, TRUE, '');
$ormargins = $pdf
->getOriginalMargins();
$pagenumtxt = t('Page !n of !total', array(
'!n' => $pdf
->PageNo(),
'!total' => $pdf
->getAliasNbPages(),
));
//Print page number
if ($pdf
->getRTL()) {
$pdf
->SetX($ormargins['right']);
$pdf
->Cell(0, 10, $pagenumtxt, 'T', 0, 'L');
}
else {
$pdf
->SetX($ormargins['left']);
$pdf
->Cell(0, 10, $pagenumtxt, 'T', 0, 'R');
}
return $pdf;
}