Properties

$string

$string : string

Text string value

Type

string

$size

$size : integer

Text font size

Type

integer

$stroke

$stroke : array

Text stroke

Type

array

$wrap

$wrap : integer

Text wrap

Type

integer

$lineHeight

$lineHeight : integer

Text line height

Type

integer

$textParams

$textParams : array

Text parameters

Type

array

Methods

__construct()

__construct(string  $string, string  $size) 

Constructor

Instantiate a PDF text object.

Parameters

string $string
string $size

setString()

setString(string  $string) : \Pop\Pdf\Document\Page\Text

Set the text string

Parameters

string $string

Returns

\Pop\Pdf\Document\Page\Text

setSize()

setSize(integer|float  $size) : \Pop\Pdf\Document\Page\Text

Set the text size

Parameters

integer|float $size

Returns

\Pop\Pdf\Document\Page\Text

setStroke()

setStroke(integer  $width, integer  $dashLength = null, integer  $dashGap = null) : \Pop\Pdf\Document\Page\Text

Set the text stroke properties

Parameters

integer $width
integer $dashLength
integer $dashGap

Returns

\Pop\Pdf\Document\Page\Text

setWrap()

setWrap(integer  $wrap, integer  $lineHeight = null) : \Pop\Pdf\Document\Page\Text

Set the word wrap

Parameters

integer $wrap
integer $lineHeight

Returns

\Pop\Pdf\Document\Page\Text

setLineHeight()

setLineHeight(integer  $lineHeight) : \Pop\Pdf\Document\Page\Text

Set the word wrap

Parameters

integer $lineHeight

Returns

\Pop\Pdf\Document\Page\Text

setRotation()

setRotation(integer  $rotation) : \Pop\Pdf\Document\Page\Text

Method to set the rotation of the text

Parameters

integer $rotation

Throws

\OutOfRangeException

Returns

\Pop\Pdf\Document\Page\Text

getString()

getString() : string

Get the text string

Returns

string

getSize()

getSize() : integer|float

Get the text size

Returns

integer|float

getStroke()

getStroke() : array

Get the text stroke properties

Returns

array

getWrap()

getWrap() : integer

Get the word wrap

Returns

integer

getLineHeight()

getLineHeight() : integer

Get the line height

Returns

integer

getRotation()

getRotation() : integer

Get the rotation of the text

Returns

integer

setTextParams()

setTextParams(integer  $c, integer  $w, integer  $h = 100, integer  $v = 100, integer  $rot, integer  $rend) : \Pop\Pdf\Document\Page\Text

Set the text parameters for rendering text content

Parameters

integer $c

(character spacing)

integer $w

(word spacing)

integer $h

(horz stretch)

integer $v

(vert stretch)

integer $rot

(rotation, -90 - 90)

integer $rend

(render flag, 0 - 7)

Throws

\OutOfRangeException

Returns

\Pop\Pdf\Document\Page\Text

getStream()

getStream(string  $fontReference, integer  $x, integer  $y) : string

Get the text stream

Parameters

string $fontReference
integer $x
integer $y

Returns

string

calculateTextMatrix()

calculateTextMatrix() : string

Calculate text matrix

Returns

string