Table of contents
Namespace: Com\Tecnick\Pdf
enum TextFitMode: string
Source: src/TextFitMode.php:35
Backed enum for the text-cell auto-fit mode: ’’ disables auto-fit, otherwise T, S or F select a fit strategy (see Text::normalizeTextCellFitMode()).
Cases
Off = '': Auto-fit disabled.Truncate = 'T': Truncate the text to fit the cell width and height.Stretch = 'S': Compress the text horizontally to best fit the cell width.ShrinkFont = 'F': Decrease the font size only when the text is too large.
Methods
fromLoose()
Resolve a loose fit mode value to the matching enum case.
Accepts T, S or F (case-insensitive, surrounding whitespace trimmed) or an enum instance (returned unchanged). Any other value disables auto-fit (Off), matching Text::normalizeTextCellFitMode().
public static fromLoose(string|self $value): self
Parameters:
$value(string|self): Fit mode or enum case.
Returns: self
Source: src/TextFitMode.php:58