SetaPDF_Extractor_TextItem A text item.

File: /SetaPDF v2/Extractor/TextItem.php

Class hierarchy

Implements

Summary

Properties

$_baselineEnd

$_baselineStart

$_bounds

The bounds of this text item.

$_characterSpacing

The character spacing value.

$_end

The current transformation matrix when the text item ends.

$_filterId

protected null|string SetaPDF_Extractor_TextItem::$_filterId

The filter id which accepted this item.

$_font

The font object used by this text item.

$_fontSize

The font size.

$_no

protected string SetaPDF_Extractor_TextItem::$_no

An item identifier.

$_orientation

The orientation of this text item.

$_rawString

The raw PDF string.

$_scaling

The scaling value.

$_spaceWidth

The space width of the font used by this text item.

$_start

The current transformation matrix when the text item starts.

$_string

protected string[] SetaPDF_Extractor_TextItem::$_string = array()

The resulting string in a specific encoding.

$_ul

The upper left point/vector of this text item.

$_wordSpacing

The word spacing value.


Methods

__construct()

public SetaPDF_Extractor_TextItem::__construct (
string $rawString, SetaPDF_Core_Font $font, float $fontSize, float $characterSpacing, float $wordSpacing, float $scaling, SetaPDF_Core_Geometry_Matrix $start, SetaPDF_Core_Geometry_Matrix $end, string $no
)

The constructor.

Parameters
$rawString : string
 
$font : SetaPDF_Core_Font
 
$fontSize : float
 
$characterSpacing : float
 
$wordSpacing : float
 
$scaling : float
 
$start : SetaPDF_Core_Geometry_Matrix
 
$end : SetaPDF_Core_Geometry_Matrix
 
$no : string
 

cleanUp()

public SetaPDF_Extractor_TextItem::cleanUp (
void
): void

Release memory and cycled references

getBaseLineEnd()

Get the baseline end vector.

getBaseLineStart()

Get the baseline start vector.

getBounds()

Get the bounds of this text item.

Exceptions

Throws SetaPDF_Core_Exception

getCharacterSpacing()

Get the character spacing.

The value is from the local graphic state and not a value in the user space.

getEndMatrix()

Get the transformation matrix which was defined after the text item was shown.

getFilterId()

public SetaPDF_Extractor_TextItem::getFilterId (
void
): null|string

Get the filter id by which this item was accepted.

getFont()

Get the text items font object.

getFontSize()

public SetaPDF_Extractor_TextItem::getFontSize (
void
): float

Get the font size of this text item.

The value is from the local graphic state and not a value in the user space.

getLl()

Get the lower left vector.

Exceptions

Throws SetaPDF_Core_Exception

getLr()

Get lower right vector.

Exceptions

Throws SetaPDF_Core_Exception

getNo()

public SetaPDF_Extractor_TextItem::getNo (
void
): string

Get the text item identification.

getOrientation()

Get the orientation of the text item.

getRawString()

public SetaPDF_Extractor_TextItem::getRawString (
void
): string

Get the raw string.

getScaling()

public SetaPDF_Extractor_TextItem::getScaling (
void
): float

Get the scaling value.

The value is from the local graphic state and not a value in the user space.

getStartMatrix()

Get the transformation matrix which was defined when the text item started.

getString()

public SetaPDF_Extractor_TextItem::getString (
[ string $encoding = 'UTF-8' ]
): string

Get the string in a specific encoding.

Parameters
$encoding : string
 

getUl()

Get the upper left vector.

Exceptions

Throws SetaPDF_Core_Exception

getUr()

Get the upper right vector.

Exceptions

Throws SetaPDF_Core_Exception

getUserSpaceSpaceWidth()

Get the width of the space character in user space.

Exceptions

Throws SetaPDF_Core_Exception

getWordSpacing()

Get the word spacing defined in its graphic state.

The value is from the local graphic state and not a value in the user space.

setFilterId()

public SetaPDF_Extractor_TextItem::setFilterId (
string $filterId
): void

Sets the filter id by which this item was accepted.

Parameters
$filterId : string