You are here

public function WkhtmltopdfGenerator::setPageOrientation 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::setPageOrientation()

Set the paper orientation of the generated PDF pages.

Parameters

PdfGeneratorInterface::PORTRAIT|PdfGeneratorInterface::LANDSCAPE $orientation: The orientation of the PDF pages.

Overrides PdfGeneratorInterface::setPageOrientation

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

File

src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php, line 110
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 setPageOrientation($orientation = PdfGeneratorInterface::PORTRAIT) {
  $this
    ->setOptions(array(
    'orientation' => $orientation,
  ));
}