You are here

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

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

Sets the header in the PDF.

Parameters

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

Overrides PdfGeneratorInterface::setHeader

1 call to MpdfGenerator::setHeader()
MpdfGenerator::preGenerate in src/Plugin/PdfGenerator/MpdfGenerator.php
Set the global options from the plugin into the mPDF generator class.

File

src/Plugin/PdfGenerator/MpdfGenerator.php, line 108
Contains \Drupal\pdf_api\Plugin\MpdfGenerator.

Class

MpdfGenerator
A PDF generator plugin for the mPDF library.

Namespace

Drupal\pdf_api\Plugin\PdfGenerator

Code

public function setHeader($text) {
  $this->generator
    ->SetHeader($text);
}