function theme_print_pdf_tcpdf_page in Printer, email and PDF versions 5.x
Same name and namespace in other branches
- 5.4 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_page()
- 5.3 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_page()
- 6 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_page()
- 7.2 print_pdf/lib_handlers/print_pdf_tcpdf/print_pdf_tcpdf.pages.inc \theme_print_pdf_tcpdf_page()
- 7 print_pdf/print_pdf.pages.inc \theme_print_pdf_tcpdf_page()
Format the TCPDF page settings (margins, etc)
Parameters
$pdf: current TCPDF object
See also
1 theme call to theme_print_pdf_tcpdf_page()
- _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 502
Code
function theme_print_pdf_tcpdf_page($pdf) {
// set margins
$pdf
->SetMargins(15, 20, 15);
// set auto page breaks
$pdf
->SetAutoPageBreak(TRUE, 15);
// set image scale factor
sscanf(PDF_PRODUCER, "TCPDF %d.%d.%d", $major, $minor, $build);
$imagescale = $major >= 4 && $minor >= 6 && $build >= 2 ? 1 : 4;
$pdf
->setImageScale($imagescale);
// set image compression quality
$pdf
->setJPEGQuality(100);
return $pdf;
}