Table of contents
Namespace: Com\Tecnick\Pdf\Page
Backing type: string
File: Orientation.php line 35
Backed enum for the requested page orientation: ‘P’ (portrait), ‘L’ (landscape) or ’’ (auto-detect from the page dimensions).
Tags
- since: 2026-07-17
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2011-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf-page
Cases
Portrait
File: Orientation.php line 37
Landscape
File: Orientation.php line 39
Auto
File: Orientation.php line 41
Methods
fromLoose()
File: Orientation.php line 52
public static fromLoose(string|self $value) : self
Accepts an enum instance (returned unchanged) or a string. As in getPageOrientedSize(), only the exact values ‘P’ and ‘L’ select an orientation; anything else means auto (never throws).
Parameters
- $value : string|self: Orientation identifier or enum case.
Return values
self