public function TcpdfGenerator::setPageSize in PDF generator API 2.x
Same name and namespace in other branches
- 8 src/Plugin/PdfGenerator/TcpdfGenerator.php \Drupal\pdf_api\Plugin\PdfGenerator\TcpdfGenerator::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/ TcpdfGenerator.php, line 104 - Contains \Drupal\pdf_api\Plugin\TcpdfGenerator.
Class
- TcpdfGenerator
- A PDF generator plugin for the mPDF library.
Namespace
Drupal\pdf_api\Plugin\PdfGeneratorCode
public function setPageSize($page_size) {
if ($this
->isValidPageSize($page_size)) {
$this->generator
->AddPage("", $page_size, FALSE, TRUE);
}
}