Table of contents
Namespace: Com\Tecnick\Pdf
Backing type: string
File: TextHAlign.php line 35
Backed enum for the horizontal alignment of text inside a cell: L (left), C (center), R (right) or J (justify).
Tags
- since: 2026-07-17
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2002-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
Cases
Left
File: TextHAlign.php line 37
Center
File: TextHAlign.php line 39
Right
File: TextHAlign.php line 41
Justify
File: TextHAlign.php line 43
Methods
fromLoose()
File: TextHAlign.php line 54
public static fromLoose(string|self $value) : self
Accepts L, C, R or J (case-insensitive, surrounding whitespace trimmed) or an enum instance (returned unchanged). Unknown values fall back to Left, matching the cell horizontal alignment default.
Parameters
- $value : string|self: Horizontal alignment or enum case.
Return values
self