public function WkhtmltopdfGenerator::setPageSize in PDF generator API 8
Same name and namespace in other branches
- 2.x src/Plugin/PdfGenerator/WkhtmltopdfGenerator.php \Drupal\pdf_api\Plugin\PdfGenerator\WkhtmltopdfGenerator::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
1 call to WkhtmltopdfGenerator::setPageSize()
- WkhtmltopdfGenerator::setter in src/
Plugin/ PdfGenerator/ WkhtmltopdfGenerator.php - Set the various options for PDF.
File
- src/
Plugin/ PdfGenerator/ WkhtmltopdfGenerator.php, line 117 - Contains \Drupal\pdf_api\Plugin\WkhtmltopdfGenerator.
Class
- WkhtmltopdfGenerator
- A PDF generator plugin for the WKHTMLTOPDF library.
Namespace
Drupal\pdf_api\Plugin\PdfGeneratorCode
public function setPageSize($page_size) {
if ($this
->isValidPageSize($page_size)) {
$this
->setOptions(array(
'page-size' => $page_size,
));
}
}