public function DompdfGenerator::setPageSize in PDF generator API 8
Same name and namespace in other branches
- 2.x src/Plugin/PdfGenerator/DompdfGenerator.php \Drupal\pdf_api\Plugin\PdfGenerator\DompdfGenerator::setPageSize()
Set the page size of the generated PDF pages.
Parameters
string $page_size: The page size (e.g. A4, B2, Letter).
Overrides PdfGeneratorInterface::setPageSize
File
- src/
Plugin/ PdfGenerator/ DompdfGenerator.php, line 102 - Contains \Drupal\pdf_api\Plugin\DompdfGenerator.
Class
- DompdfGenerator
- A PDF generator plugin for the dompdf library.
Namespace
Drupal\pdf_api\Plugin\PdfGeneratorCode
public function setPageSize($page_size) {
if ($this
->isValidPageSize($page_size)) {
$this->generator
->set_paper($page_size);
}
}