You are here

protected function WkhtmltopdfGenerator::preGenerate in PDF generator API 8

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

Set the global options from plugin into the WKHTMLTOPDF generator class.

3 calls to WkhtmltopdfGenerator::preGenerate()
WkhtmltopdfGenerator::save in src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php
Generate and save the PDF at a specific location.
WkhtmltopdfGenerator::send in src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php
The name of the file to be downloaded.
WkhtmltopdfGenerator::stream in src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php
Stream the PDF to the browser.

File

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

Class

WkhtmltopdfGenerator
A PDF generator plugin for the WKHTMLTOPDF library.

Namespace

Drupal\pdf_api\Plugin\PdfGenerator

Code

protected function preGenerate() {
  $this->generator
    ->setOptions($this->options);
}