Text

Text PDF data

Namespace: Com\Tecnick\Pdf

Extends: Cell

Abstract: Yes

File: Text.php line 90

Text PDF data

Tags

  • since: 2002-08-03
  • 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
  • phpstan-import-type: TTextDims from \Com\Tecnick\Pdf\Font\Stack
  • phpstan-import-type: TTextSplit from \Com\Tecnick\Pdf\Font\Stack
  • phpstan-import-type: StyleDataOpt from \Com\Tecnick\Pdf\Cell
  • phpstan-import-type: TCellDef from \Com\Tecnick\Pdf\Cell
  • phpstan-import-type: PageInputData from \Com\Tecnick\Pdf\Page\Box
  • phpstan-import-type: PageData from \Com\Tecnick\Pdf\Page\Box
  • phpstan-import-type: TFontMetric from \Com\Tecnick\Pdf\Font\Stack
  • phpstan-import-type: TBBox from \Com\Tecnick\Pdf\Base
  • phpstan-import-type: TFourFloat from \Com\Tecnick\Pdf\Base
  • phpstan-import-type: TStackUnitBBox from \Com\Tecnick\Pdf\Base
  • phpstan-import-type: TPdfUaStructElem from \Com\Tecnick\Pdf\Base
  • phpstan-import-type: TPdfUaStructKid from \Com\Tecnick\Pdf\Base
  • phpstan-type: TextCellStyles array{ all?: StyleDataOpt, // One style applied to all four borders. L?: StyleDataOpt, // Left border style. T?: StyleDataOpt, // Top border style. R?: StyleDataOpt, // Right border style. B?: StyleDataOpt, // Bottom border style. }
  • phpstan-type: TextCellStylesLegacy array{ all?: StyleDataOpt, // One style applied to all four borders. 0?: StyleDataOpt, // Top border style (legacy numeric side index). 1?: StyleDataOpt, // Right border style (legacy numeric side index). 2?: StyleDataOpt, // Bottom border style (legacy numeric side index). 3?: StyleDataOpt, // Left border style (legacy numeric side index). }
  • phpstan-type: TextCellStylesInput TextCellStyles|TextCellStylesLegacy
  • phpstan-type: TextShadow array{ ‘xoffset’: float, ‘yoffset’: float, ‘opacity’: float, ‘mode’: string, ‘color’: string, }
  • phpstan-type: TextLinePos array{ ‘pos’: int, ‘chars’: int, ‘spaces’: int, ‘septype’: string, ’totwidth’: float, ’totspacewidth’: float, ‘words’: int, }
  • SuppressWarnings: (“PHPMD.DepthOfInheritance”)

Constants

BORDERPOS_DEFAULT

File: Base.php line 1405

public mixed BORDERPOS_DEFAULT = 0.0

BORDERPOS_EXTERNAL

File: Base.php line 1411

public mixed BORDERPOS_EXTERNAL = -0.5

BORDERPOS_INTERNAL

File: Base.php line 1417

public mixed BORDERPOS_INTERNAL = 0.5

ZEROCELL

File: Base.php line 1436

public TCellDef ZEROCELL = ['margin' => self::ZEROCELLBOUND, 'padding' => self::ZEROCELLBOUND, 'borderpos' => self::BORDERPOS_DEFAULT]

ZEROCELLBOUND

File: Base.php line 1424

public TCellBound ZEROCELLBOUND = ['T' => 0.0, 'R' => 0.0, 'B' => 0.0, 'L' => 0.0]

Properties

$barcode

File: Base.php line 732

public Barcode $barcode

$cache

File: Base.php line 747

public Cache $cache

$color

File: Base.php line 727

public PdfColor $color

$encrypt

File: Base.php line 722

public Encrypt $encrypt

$file

File: Base.php line 737

public File $file

$font

File: Base.php line 773

public Stack $font

$graph

File: Base.php line 768

public Draw $graph

$image

File: Base.php line 778

public Import $image

$markupFile

File: Base.php line 742

public File $markupFile

$page

File: Base.php line 763

public Page $page

$pon

File: Base.php line 1148

public int $pon = 0

$uniconv

File: Base.php line 758

public Convert $uniconv

Methods

addArtifactContent()

File: Text.php line 1036

public addArtifactContent(string $content, int $pid[, string $type = '' ][, string $subtype = '' ]) : void

This is the preferred API for decorative graphics and page furniture because it writes the wrapped content directly to the selected page.

Parameters

  • $content : string: Raw PDF operators to wrap.
  • $pid : int: Page index.
  • $type : string = ‘’: Optional Artifact /Type (for example ‘Pagination’).
  • $subtype : string = ‘’: Optional Artifact /Subtype (for example ‘Header’ or ‘Footer’).

Tags

  • throws: Exception

addPage()

File: Text.php line 3628

public addPage([PageInputData $data = [] ]) : PageData

Parameters

  • $data : PageInputData = []: Page data.

Tags

  • throws: Exception
  • throws: Exception
  • throws: Exception

Return values

PageData —

Page data with additional Page ID property ‘pid’.

addTaggedFigureContent()

File: Text.php line 963

public addTaggedFigureContent(string $content, int $pid[, string $alt = '' ][, TFourFloat|array{} $bbox = [] ]) : void

Pass raw drawing/image operators (for example from graph or image helpers) to associate them with a Figure structure element and optional /Alt text.

Parameters

  • $content : string: Raw drawing/image operators to place inside the Figure.
  • $pid : int: Page identifier the content is added to.
  • $alt : string = ‘’: Optional alternate text written as the Figure /Alt entry.
  • $bbox : TFourFloat|array{} = []: Optional bounding box of the content as [llx, lly, urx, ury] in points, measured in default user space with the origin at the bottom-left page corner. Written as the /BBox Layout attribute, which PDF/UA requires for figures contained on a single page.

Tags

  • throws: Exception

addTextCell()

File: Text.php line 540

public addTextCell(string $txt[, int $pid = -1 ][, float $posx = 0 ][, float $posy = 0 ][, float $width = 0 ][, float $height = 0 ][, float $offset = 0 ][, float $linespace = 0 ][, string|TextVAlign $valign = 'T' ][, string|TextHAlign $halign = '' ][, TCellDef|null $cell = null ][, TextCellStylesInput $styles = [] ][, float $strokewidth = 0 ][, float $wordspacing = 0 ][, float $leading = 0 ][, float $rise = 0 ][, bool $jlast = true ][, bool $fill = true ][, bool $stroke = false ][, bool $underline = false ][, bool $linethrough = false ][, bool $overline = false ][, bool $clip = false ][, bool $drawcell = true ][, string|TextDirection $forcedir = '' ][, TextShadow|null $shadow = null ][, string|TextFitMode $fit = '' ]) : void

Accounts for automatic line, page and region breaks.

Parameters

  • $txt : string: Text string to be processed.
  • $pid : int = -1: Page index. Omit or set it to -1 for the current page ID.
  • $posx : float = 0: Abscissa of upper-left corner relative to the region origin X coordinate.
  • $posy : float = 0: Ordinate of upper-left corner relative to the region origin Y coordinate.
  • $width : float = 0: Width.
  • $height : float = 0: Height.
  • $offset : float = 0: Horizontal offset to apply to the line start.
  • $linespace : float = 0: Additional space to add between lines.
  • $valign : string|TextVAlign = ‘T’: Text vertical alignment inside the cell: T=top; C=center; B=bottom (or enum case).
  • $halign : string|TextHAlign = ‘’: Text horizontal alignment inside the cell: L=left; C=center; R=right; J=justify (or enum).
  • $cell : TCellDef|null = null: Optional to overwrite cell parameters for padding, margin etc. The margin and padding values are in points.
  • $styles : TextCellStylesInput = []: Cell border styles (see: getCurrentStyleArray).
  • $strokewidth : float = 0: Stroke width.
  • $wordspacing : float = 0: Word spacing (use it only when justify == false).
  • $leading : float = 0: Leading.
  • $rise : float = 0: Text rise.
  • $jlast : bool = true: If true does not justify the last line when $halign == J.
  • $fill : bool = true: If true fills the text.
  • $stroke : bool = false: If true stroke the text.
  • $underline : bool = false: If true underline the text.
  • $linethrough : bool = false: If true line through the text.
  • $overline : bool = false: If true overline the text.
  • $clip : bool = false: If true activate clipping mode.
  • $drawcell : bool = true: If true draw the cell border.
  • $forcedir : string|TextDirection = ‘’: If ‘R’ forces RTL, if ‘L’ forces LTR.
  • $shadow : TextShadow|null = null: Text shadow parameters.
  • $fit : string|TextFitMode = ‘’: Option to fit the overflowing text in the given cell dimensions (or enum case). Supported values: - ‘’: disabled (default) - ‘T’: truncate text to fit width and height - ‘S’: compress horizontally to best fit width - ‘F’: decrease font size only when text is too large

Tags

  • throws: Exception
  • throws: Exception
  • throws: Exception

addTextCellXY()

File: Text.php line 433

public addTextCellXY(string $txt[, int $pid = -1 ][, float $posx = 0 ][, float $posy = 0 ][, float $width = 0 ][, float $height = 0 ][, float $offset = 0 ][, float $linespace = 0 ][, string|TextVAlign $valign = 'T' ][, string|TextHAlign $halign = '' ][, TCellDef|null $cell = null ][, TextCellStylesInput $styles = [] ][, float $strokewidth = 0 ][, float $wordspacing = 0 ][, float $leading = 0 ][, float $rise = 0 ][, bool $jlast = true ][, bool $fill = true ][, bool $stroke = false ][, bool $underline = false ][, bool $linethrough = false ][, bool $overline = false ][, bool $clip = false ][, bool $drawcell = true ][, string|TextDirection $forcedir = '' ][, TextShadow|null $shadow = null ][, string|TextFitMode $fit = '' ]) : void

Accounts for automatic line, page and region breaks.

Parameters

  • $txt : string: Text string to be processed.
  • $pid : int = -1: Page index. Omit or set it to -1 for the current page ID.
  • $posx : float = 0: Abscissa of upper-left corner.
  • $posy : float = 0: Ordinate of upper-left corner.
  • $width : float = 0: Width.
  • $height : float = 0: Height.
  • $offset : float = 0: Horizontal offset to apply to the line start.
  • $linespace : float = 0: Additional space to add between lines.
  • $valign : string|TextVAlign = ‘T’: Text vertical alignment inside the cell: T=top; C=center; B=bottom (or enum case).
  • $halign : string|TextHAlign = ‘’: Text horizontal alignment inside the cell: L=left; C=center; R=right; J=justify (or enum).
  • $cell : TCellDef|null = null: Optional to overwrite cell parameters for padding, margin etc. The margin and padding values are in points.
  • $styles : TextCellStylesInput = []: Cell border styles (see: getCurrentStyleArray).
  • $strokewidth : float = 0: Stroke width.
  • $wordspacing : float = 0: Word spacing (use it only when justify == false).
  • $leading : float = 0: Leading.
  • $rise : float = 0: Text rise.
  • $jlast : bool = true: If true does not justify the last line when $halign == J.
  • $fill : bool = true: If true fills the text.
  • $stroke : bool = false: If true stroke the text.
  • $underline : bool = false: If true underline the text.
  • $linethrough : bool = false: If true line through the text.
  • $overline : bool = false: If true overline the text.
  • $clip : bool = false: If true activate clipping mode.
  • $drawcell : bool = true: If true draw the cell border.
  • $forcedir : string|TextDirection = ‘’: If ‘R’ forces RTL, if ‘L’ forces LTR.
  • $shadow : TextShadow|null = null: Text shadow parameters.
  • $fit : string|TextFitMode = ‘’: Option to fit the overflowing text in the given cell dimensions (or enum case). Supported values: - ‘’: disabled (default) - ‘T’: truncate text to fit width and height - ‘S’: compress horizontally to best fit width - ‘F’: decrease font size only when text is too large

Tags

  • throws: Exception
  • throws: Exception
  • throws: Exception

beginArtifact()

File: Text.php line 984

public beginArtifact([string $type = '' ][, string $subtype = '' ]) : string

Typical usage is for repeated page furniture (header/footer/page numbers), decorative graphics, separators, and similar visual-only content. This method returns the opening PDF operators and does not write them to the current page automatically. To persist the artifact block, append the returned string with page->addContent(…) or use addArtifactContent().

Parameters

  • $type : string = ‘’: Optional Artifact /Type name (for example ‘Pagination’).
  • $subtype : string = ‘’: Optional Artifact /Subtype name (for example ‘Header’ or ‘Footer’).

Return values

string

beginStructElem()

File: Text.php line 871

public beginStructElem(string $role, int $pid[, string|null $alt = null ][, array<string, string> $attr = [] ][, bool $required = false ]) : void

Call this before rendering the content of a logical block (e.g.

,

). All addTextCell calls until endStructElem() share the same structure element.

Parameters

  • $role : string: PDF structure role, e.g. ‘P’, ‘H1’, ‘H2’, ‘L’, ‘LI’, ‘Figure’.
  • $pid : int: Page index (from addPage / getPageId).
  • $alt : string|null = null: Optional alternate description written as /Alt in the structure element dictionary, typically alt-text for Figure elements.
  • $attr : array<string, string> = []: Optional structure element attributes, serialized as a PDF dictionary in the /A entry.
  • $required : bool = false: When true, the element is kept in the structure tree even if it receives no marked content (e.g. an empty table cell).

defaultFileAllowedPaths()

File: Base.php line 1645

public defaultFileAllowedPaths() : array<string|int, string>

Return values

array<string|int, string>

defaultMarkupAllowedPaths()

File: Base.php line 1655

public defaultMarkupAllowedPaths() : array<string|int, string>

Return values

array<string|int, string>

defaultPageContent()

File: Text.php line 3706

public defaultPageContent([int $pid = -1 ]) : string

Override this method to add custom content to all pages.

Parameters

  • $pid : int = -1: Page index. Omit or set it to -1 for the current page ID.

Tags

  • throws: Exception
  • throws: Exception
  • throws: Exception

Return values

string —

PDF output code.

enableDefaultPageContent()

File: Base.php line 1514

public enableDefaultPageContent([bool $enable = true ]) : void

Parameters

  • $enable : bool = true: Enable or disable the default page content.

enableZeroWidthBreakPoints()

File: Text.php line 3498

public enableZeroWidthBreakPoints(bool $enabled) : void

Parameters

  • $enabled : bool

endArtifact()

File: Text.php line 1014

public endArtifact() : string

Like beginArtifact(), this returns raw PDF operators and must be appended to the page content explicitly when using the low-level API.

Return values

string

endStructElem()

File: Text.php line 908

public endStructElem() : void

The completed element (with all its MCIDs) is appended to the struct log.

getLastBBox()

File: Text.php line 2926

public getLastBBox() : TBBox

Return values

TBBox —

Array of bounding box values.

getLastCellBBox()

File: Text.php line 2962

public getLastCellBBox() : TBBox

Return values

TBBox —

Array of bounding box values.

getLastTextBBox()

File: Text.php line 2944

public getLastTextBBox() : TBBox

Return values

TBBox —

Array of bounding box values.

getTextCell()

File: Text.php line 230

public getTextCell(string $txt[, float $posx = 0 ][, float $posy = 0 ][, float $width = 0 ][, float $height = 0 ][, float $offset = 0 ][, float $linespace = 0 ][, string|TextVAlign $valign = 'C' ][, string|TextHAlign $halign = 'C' ][, TCellDef|null $cell = null ][, TextCellStylesInput $styles = [] ][, float $strokewidth = 0 ][, float $wordspacing = 0 ][, float $leading = 0 ][, float $rise = 0 ][, bool $jlast = true ][, bool $fill = true ][, bool $stroke = false ][, bool $underline = false ][, bool $linethrough = false ][, bool $overline = false ][, bool $clip = false ][, bool $drawcell = true ][, string|TextDirection $forcedir = '' ][, TextShadow|null $shadow = null ][, string|TextFitMode $fit = '' ]) : string

Parameters

  • $txt : string: Text string to be processed.
  • $posx : float = 0: Abscissa of upper-left corner.
  • $posy : float = 0: Ordinate of upper-left corner.
  • $width : float = 0: Width.
  • $height : float = 0: Height.
  • $offset : float = 0: Horizontal offset to apply to the line start.
  • $linespace : float = 0: Additional space to add between lines.
  • $valign : string|TextVAlign = ‘C’: Text vertical alignment inside the cell: T=top; C=center; B=bottom (or enum case).
  • $halign : string|TextHAlign = ‘C’: Text horizontal alignment inside the cell: L=left; C=center; R=right; J=justify (or enum).
  • $cell : TCellDef|null = null: Optional to overwrite cell parameters for padding, margin etc. The margin and padding values are in points.
  • $styles : TextCellStylesInput = []: Cell border styles (see: getCurrentStyleArray).
  • $strokewidth : float = 0: Stroke width.
  • $wordspacing : float = 0: Word spacing (use it only when justify == false).
  • $leading : float = 0: Leading.
  • $rise : float = 0: Text rise.
  • $jlast : bool = true: If true does not justify the last line when $halign == J.
  • $fill : bool = true: If true fills the text.
  • $stroke : bool = false: If true stroke the text.
  • $underline : bool = false: If true underline the text.
  • $linethrough : bool = false: If true line through the text.
  • $overline : bool = false: If true overline the text.
  • $clip : bool = false: If true activate clipping mode.
  • $drawcell : bool = true: If true draw the cell border.
  • $forcedir : string|TextDirection = ‘’: If ‘R’ forces RTL, if ‘L’ forces LTR.
  • $shadow : TextShadow|null = null: Text shadow parameters.
  • $fit : string|TextFitMode = ‘’: Option to fit the overflowing text in the given cell dimensions (or enum case). Supported values: - ‘’: disabled (default) - ‘T’: truncate text to fit width and height - ‘S’: compress horizontally to best fit width - ‘F’: decrease font size only when text is too large

Tags

  • throws: Exception
  • throws: Exception
  • throws: Exception

Return values

string

getTextLine()

File: Text.php line 2275

public getTextLine(string $txt[, float $posx = 0 ][, float $posy = 0 ][, float $width = 0 ][, float $strokewidth = 0 ][, float $wordspacing = 0 ][, float $leading = 0 ][, float $rise = 0 ][, bool $fill = true ][, bool $stroke = false ][, bool $underline = false ][, bool $linethrough = false ][, bool $overline = false ][, bool $clip = false ][, string|TextDirection $forcedir = '' ][, string $txtanchor = '' ][, TextShadow|null $shadow = null ]) : string

Parameters

  • $txt : string: Text string to be processed.
  • $posx : float = 0: X position relative to the start of the current line.
  • $posy : float = 0: Y position relative to the start of the current line (font baseline).
  • $width : float = 0: Desired string width to force justification via word spacing (0 = automatic).
  • $strokewidth : float = 0: Stroke width.
  • $wordspacing : float = 0: Word spacing (use it only when width == 0).
  • $leading : float = 0: Leading.
  • $rise : float = 0: Text rise.
  • $fill : bool = true: If true fills the text.
  • $stroke : bool = false: If true stroke the text.
  • $underline : bool = false: If true underline the text.
  • $linethrough : bool = false: If true line through the text.
  • $overline : bool = false: If true overline the text.
  • $clip : bool = false: If true activate clipping mode.
  • $forcedir : string|TextDirection = ‘’: If ‘R’ forces RTL, if ‘L’ forces LTR.
  • $txtanchor : string = ‘’: Text anchor position: ‘S’=start (default), ‘M’=middle, ‘E’=end.
  • $shadow : TextShadow|null = null: Text shadow parameters.

Tags

  • throws: Exception
  • throws: Exception
  • throws: Exception

Return values

string

getWarnings()

File: Base.php line 1860

public getWarnings() : array<int, string>

The list is filled while the content is written and while the document is serialized, so it is complete only after getOutPDFString() has been called.

Return values

array<int, string>

initClassObjects()

File: Base.php line 2065

public initClassObjects([Encrypt|null $objEncrypt = null ][, TFileOptions|null $fileOptions = null ][, CacheInterface|null $cache = null ]) : void

Parameters

  • $objEncrypt : Encrypt|null = null: Encryption object.
  • $fileOptions : TFileOptions|null = null: Optional configuration for the shared file helper used to load external resources (images, fonts, SVG, etc.). Supported keys: - allowedHosts (string[]): Whitelist of host names that the library is allowed to fetch over HTTP/HTTPS. For security reasons remote URL loading is DISABLED by default; you MUST populate this list (for example [’example.com’, ‘cdn.example.com’]) to enable any remote download. Local file reads are controlled separately by allowedPaths. - maxRemoteSize (int): Maximum size in bytes accepted for a remote download (default 52428800 = 50 MiB). - curlopts (array<int,bool|int|string>): Per-request cURL options merged on top of the defaults (keys are CURLOPT_* constants). - defaultCurlOpts (array<int,bool|int|string>): Replaces the built-in default cURL options. Use with care; omit to keep the safe defaults. - fixedCurlOpts (array<int,bool|int|string>): cURL options that are always enforced and cannot be overridden by curlopts (for example to pin TLS settings). - allowedPaths (string[]): Trusted local path prefixes for file:// reads. Defaults are automatically computed from the package location to cover bundled example assets. - markupAllowedPaths (string[]): Trusted local path prefixes for resources referenced by rendered HTML/CSS/SVG markup. Defaults exclude the system temp directory; when omitted, explicit allowedPaths values are reused for markup too.
  • $cache : CacheInterface|null = null: Optional external cache shared by the cacheable sub-libraries (font subsets, images, …). The application owns the backend, its (de)serialization, expiration and size limits. Null (default) disables external caching.

Tags

  • throws: Exception
  • throws: Exception
  • throws: Exception
  • throws: Exception
  • throws: Exception
  • throws: Exception

loadTexHyphenPatterns()

File: Text.php line 3374

public loadTexHyphenPatterns(string $file) : array<string, string>

Parameters

Tags

Return values

array<string, string> —

Array of hyphenation patterns.

resumePdfUaTagging()

File: Text.php line 849

public resumePdfUaTagging(string $previous) : void

Parameters

  • $previous : string

setCurrentPage()

File: Text.php line 3648

public setCurrentPage([int $pid = -1 ]) : PageData

Parameters

  • $pid : int = -1: page index. Omit or set it to -1 for the current page ID.

Tags

  • throws: Exception

Return values

PageData —

Page data.

setDefaultCellBorderPos()

File: Cell.php line 131

public setDefaultCellBorderPos(float $borderpos) : void

Parameters

  • $borderpos : float: The border position to set: BORDERPOS_DEFAULT BORDERPOS_EXTERNAL BORDERPOS_INTERNAL

setDefaultCellMargin()

File: Cell.php line 96

public setDefaultCellMargin(float $top, float $right, float $bottom, float $left) : void

The values are converted and stored in internal points, so the margin of a cell definition array passed to the text methods must be already in points.

Parameters

  • $top : float: Top.
  • $right : float: Right.
  • $bottom : float: Bottom.
  • $left : float: Left.

setDefaultCellPadding()

File: Cell.php line 115

public setDefaultCellPadding(float $top, float $right, float $bottom, float $left) : void

The values are converted and stored in internal points, so the padding of a cell definition array passed to the text methods must be already in points.

Parameters

  • $top : float: Top.
  • $right : float: Right.
  • $bottom : float: Bottom.
  • $left : float: Left.

setPDFVersion()

File: Base.php line 1969

public setPDFVersion([string $version = '1.7' ]) : static

Parameters

  • $version : string = ‘1.7’: PDF document version.

Tags

Return values

static

setRTL()

File: Base.php line 1624

public setRTL(bool $enabled) : static

Parameters

  • $enabled : bool: False = LTR = Left-To-Right; True = RTL = Right-To-Left.

Return values

static

setTexHyphenPatterns()

File: Text.php line 3427

public setTexHyphenPatterns(array<string, string> $patterns) : void

Parameters

  • $patterns : array<string, string>: Array of hyphenation patterns.

Tags

  • see: loadTexHyphenPatterns()

suspendPdfUaTagging()

File: Text.php line 838

public suspendPdfUaTagging() : string

While suspended, beginStructElem()/endStructElem() and the marked-content helpers are no-ops, so no structure elements are appended and the per-page MCID counter does not advance.

Returns the previous mode, to be passed back to resumePdfUaTagging(). Suspensions nest.

Return values

string

toPoints()

File: Base.php line 1454

public toPoints(float $usr) : float

Parameters

  • $usr : float: Value to convert.

Return values

float

toUnit()

File: Base.php line 1464

public toUnit(float $pnt) : float

Parameters

  • $pnt : float: Value to convert in user units.

Return values

float

toYPoints()

File: Base.php line 1478

public toYPoints(float $usr[, float $pageh = -1 ]) : float

Note: the internal Y points coordinate starts at the bottom left of the page.

Parameters

  • $usr : float: Value to convert.
  • $pageh : float = -1: Optional page height in internal points ($pageh:$this->page->getPage()[‘pheight’]).

Tags

  • throws: Exception

Return values

float

toYUnit()

File: Base.php line 1497

public toYUnit(float $pnt[, float $pageh = -1 ]) : float

Note: the internal Y points coordinate starts at the bottom left of the page.

Parameters

  • $pnt : float: Value to convert.
  • $pageh : float = -1: Optional page height in internal points ($pageh:$this->page->getPage()[‘pheight’]).

Tags

  • throws: Exception

Return values

float