You are here

public function DompdfGenerator::addPage in PDF generator API 8

Same name and namespace in other branches
  1. 2.x src/Plugin/PdfGenerator/DompdfGenerator.php \Drupal\pdf_api\Plugin\PdfGenerator\DompdfGenerator::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 DompdfGenerator::addPage()
DompdfGenerator::setter in src/Plugin/PdfGenerator/DompdfGenerator.php
Set the various options for PDF.

File

src/Plugin/PdfGenerator/DompdfGenerator.php, line 87
Contains \Drupal\pdf_api\Plugin\DompdfGenerator.

Class

DompdfGenerator
A PDF generator plugin for the dompdf library.

Namespace

Drupal\pdf_api\Plugin\PdfGenerator

Code

public function addPage($html) {
  $this->generator
    ->load_html($html);
  $this->generator
    ->render();
}