public function PdfFormat::formattedHeaderFooter in Printer and PDF versions for Drupal 8+ 8
Same name and namespace in other branches
- 2.x modules/printable_pdf/src/Plugin/PrintableFormat/PdfFormat.php \Drupal\printable_pdf\Plugin\PrintableFormat\PdfFormat::formattedHeaderFooter()
Set formatted header and footer.
File
- modules/
printable_pdf/ src/ Plugin/ PrintableFormat/ PdfFormat.php, line 220
Class
- PdfFormat
- Provides a plugin to display a PDF version of a page.
Namespace
Drupal\printable_pdf\Plugin\PrintableFormatCode
public function formattedHeaderFooter() {
// And this can be used by users who do not want default one, this example
// is for wkhtmltopdf generator.
$this->pdfGenerator
->getObject()
->SetFooter('This is a footer on left side||' . 'This is a footer on right side');
}