You are here

public function TcpdfGenerator::addPage in PDF generator API 2.x

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

Add a page to the generated PDF.

Parameters

string $html: The HTML of the page to be added.

Overrides PdfGeneratorInterface::addPage

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

File

src/Plugin/PdfGenerator/TcpdfGenerator.php, line 83
Contains \Drupal\pdf_api\Plugin\TcpdfGenerator.

Class

TcpdfGenerator
A PDF generator plugin for the mPDF library.

Namespace

Drupal\pdf_api\Plugin\PdfGenerator

Code

public function addPage($html) {
  $this->generator
    ->AddPage();
  $this->generator
    ->writeHTML($html);
}