function theme_print_pdf_tcpdf_footer 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_footer()
- 6 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_footer()
- 7.2 print_pdf/lib_handlers/print_pdf_tcpdf/print_pdf_tcpdf.pages.inc \theme_print_pdf_tcpdf_footer()
- 7 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_footer()
- 5.x print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_footer()
Format the TCPDF footer contents
Parameters
$pdf: current TCPDF object
$html: contents of the body of the HTML from the original node
$font: array with the font definition (font name, styles and size)
See also
theme_print_pdf_tcpdf_footer()
1 theme call to theme_print_pdf_tcpdf_footer()
- _print_pdf_tcpdf in print_pdf/
print_pdf.pages.inc - Generate the PDF file using the TCPDF library
File
- print_pdf/
print_pdf.pages.inc, line 323
Code
function theme_print_pdf_tcpdf_footer(&$pdf, &$html, $font) {
preg_match('!<div class="print-footer">(.*?)</div>!si', $html, $tpl_footer);
$footer = trim(preg_replace('!</?div[^>]*?>!i', '', $tpl_footer[1]));
// set footer font
$font[2] *= 0.8;
$pdf
->setFooterFont($font);
// set footer margin
$pdf
->SetFooterMargin(10);
// set footer data
$pdf
->SetFooterData($footer);
return $pdf;
}