Documentation

TextRun
in package

Pdf extract content text run value object class

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
6.0.0

Table of Contents

Constants

SEPARATOR_NEWLINE  = 'newline'
SEPARATOR_NONE  = 'none'
Separator constants
SEPARATOR_SPACE  = 'space'
SEPARATOR_TAB  = 'tab'

Properties

$decodedText  : string|null
$font  : mixed
$fontCacheKey  : string|null
$fontResourceName  : string|null
$rawBytes  : string|null
$reversed  : bool
$separator  : string
$x  : float
$y  : float

Methods

__construct()  : mixed
Constructor

Constants

SEPARATOR_NEWLINE

public mixed SEPARATOR_NEWLINE = 'newline'

SEPARATOR_NONE

Separator constants

public mixed SEPARATOR_NONE = 'none'

SEPARATOR_SPACE

public mixed SEPARATOR_SPACE = 'space'

SEPARATOR_TAB

public mixed SEPARATOR_TAB = 'tab'

Properties

$decodedText read-only

public string|null $decodedText

$font read-only

public mixed $font = null

$fontCacheKey read-only

public string|null $fontCacheKey = null

$fontResourceName read-only

public string|null $fontResourceName

$rawBytes read-only

public string|null $rawBytes

$reversed read-only

public bool $reversed = false

$separator read-only

public string $separator

Methods

__construct()

Constructor

public __construct(string|null $fontResourceName, string|null $rawBytes, string|null $decodedText, float $x, float $y, string $separator[, bool $reversed = false ][, mixed $font = null ][, string|null $fontCacheKey = null ]) : mixed

Instantiate a text run value object.

Parameters
$fontResourceName : string|null

The font resource name active for this run (e.g. "F1"), null for ActualText-substituted runs

$rawBytes : string|null

Raw undecoded bytes shown by Tj/TJ, null for ActualText-substituted runs

$decodedText : string|null

Pre-decoded ActualText replacement, null for raw-byte runs

$x : float

Text-space x position

$y : float

Text-space y position

$separator : string

One of the SEPARATOR_* constants describing the gap before this run

$reversed : bool = false

Whether this run is inside /ReversedChars marked content

$font : mixed = null

Resolved font dict for this run, null if unresolved

$fontCacheKey : string|null = null

Precomputed font cache key, null to compute on demand


        
On this page

Search results