php-tcpdfHow do I set the page orientation when using PHP TCPDF?
To set the page orientation when using PHP TCPDF, use the setPageOrientation() method. This method takes two parameters: the page orientation (P for portrait or L for landscape) and the page format (e.g. A4).
For example:
$pdf->setPageOrientation('L', 'A4');
This will set the page orientation to landscape and the page format to A4.
The parts of this code are:
$pdf: the TCPDF objectsetPageOrientation(): the method used to set the page orientation'L': the page orientation (Pfor portrait orLfor landscape)'A4': the page format
For more information, see the TCPDF documentation on setPageOrientation().
More of Php Tcpdf
- How do I use the setfont function in PHP TCPDF?
- How do I install TCPDF using Yum on a PHP server?
- How can I output a PDF file using PHP and TCPDF?
- How can I use PHP and TCPDF to read a PDF?
- How do I use the PHP TCPDF WriteHTMLCell function?
- How can I add a digital signature to a PDF using PHP and TCPDF?
- How can I generate a PDF from XML data using PHP and TCPDF?
- How can I use TCPDF's writeHTML() function in PHP?
- How do I set an image using PHP TCPDF?
See more codes...