You are here

public function WkhtmltopdfGenerator::setHeader in PDF generator API 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php \Drupal\pdf_api\Plugin\PdfGenerator\WkhtmltopdfGenerator::setHeader()

Sets the header in the PDF.

Parameters

string $html: The text to be rendered as header.

Overrides PdfGeneratorInterface::setHeader

1 call to WkhtmltopdfGenerator::setHeader()
WkhtmltopdfGenerator::setter in src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php
Set the various options for PDF.

File

src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php, line 101
Contains \Drupal\pdf_api\Plugin\WkhtmltopdfGenerator.

Class

WkhtmltopdfGenerator
A PDF generator plugin for the WKHTMLTOPDF library.

Namespace

Drupal\pdf_api\Plugin\PdfGenerator

Code

public function setHeader($text) {
  $this
    ->setOptions(array(
    'header-right' => $text,
  ));
}