SetaPDF_Core_Text Helper class for writing and handling text
File: /SetaPDF v2/Core/Text.php
Class hierarchy
Summary
Constants
ALIGN_CENTER
Alignment constant
ALIGN_JUSTIFY
Alignment constant
ALIGN_JUSTIFY_ALL
Alignment constant
ALIGN_LEFT
Alignment constant
ALIGN_RIGHT
Alignment constant
Static Properties
$possibleDelimiter
Delimiter characters to recognize text blocks
Value 0 means that the character prefer breaking after that character e.g. ! or ?
Value 1 means that the character prefer breaking before that character e.g. + or :
$possibleGlueCharacters
Characters that can ignore the delimiters and 'glues' multiple textblocks together
Static Methods
getLines()
public static SetaPDF_Core_Text::getLines (
string $text [, float $width = null [, SetaPDF_Core_Font_Glyph_Collection_CollectionInterface $font = null [, float $fontSize = null [, int $charSpacing = 0 [, int $wordSpacing = 0 [, array &$manualLineBreaks = array (
) ]]]]]]
): arraySplits a UTF-16BE encoded string into lines based on a specific font and width.
Parameters
- $text : string
The text encoded in UTF-16BE
- $width : float
- $font : SetaPDF_Core_Font_Glyph_Collection_CollectionInterface
- $fontSize : float
- $charSpacing : int
- $wordSpacing : int
- $manualLineBreaks : array
Return Values
An array of UTF-16BE encoded strings
normalizeLineBreaks()
Normalizes line breaks in an UTF-16BE encoded string.
\r\n to \n \r to \n
Parameters
- $text : string