public function PhpWkhtmlToPdf::setHeaderText in Entity Print 8.2
Sets the header text.
Parameters
string $text: The plain text to add to the header.
string $alignment: One of the align constants.
Return value
$this The pdf engine.
Overrides AlignableHeaderFooterInterface::setHeaderText
File
- src/
Plugin/ EntityPrint/ PrintEngine/ PhpWkhtmlToPdf.php, line 292
Class
- PhpWkhtmlToPdf
- PHP wkhtmltopdf plugin.
Namespace
Drupal\entity_print\Plugin\EntityPrint\PrintEngineCode
public function setHeaderText($text, $alignment) {
$this->pdf
->setOptions([
'header-' . $alignment => $text,
]);
return $this;
}