DisplayZoom

Backed enum for the named document zoom modes accepted by Tcpdf::setDisplayMode() (in addition to a numeric zoom factor).

Table of contents

Namespace: Com\Tecnick\Pdf

enum DisplayZoom: string

Source: src/DisplayZoom.php:35

Backed enum for the named document zoom modes accepted by Tcpdf::setDisplayMode() (in addition to a numeric zoom factor).

Cases

  • FullPage = 'fullpage': Display the entire page on screen.
  • FullWidth = 'fullwidth': Use the full width of the window.
  • Real = 'real': Real size (100%).
  • DefaultZoom = 'default': Use the viewer default zoom.

Methods

fromLoose()

Resolve a loose named zoom value to the matching enum case.

Accepts the canonical name or an enum instance (returned unchanged). Unknown values fall back to DefaultZoom, matching setDisplayMode().

public static fromLoose(string|self $value): self

Parameters:

  • $value (string|self): Named zoom or enum case.

Returns: self

Source: src/DisplayZoom.php:57