SetaPDF_Extractor_TextItem A text item.

File: /SetaPDF v2/Extractor/TextItem.php

Class hierarchy

Implements

Summary

Properties

$_baselineEnd

protected SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::$_baselineEnd

The baseline end vector.

$_baselineStart

protected SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::$_baselineStart

The baseline start vector.

$_bounds

protected SetaPDF_Extractor_Result_Bounds SetaPDF_Extractor_TextItem::$_bounds

The bounds of this text item.

$_characterSpacing

protected float SetaPDF_Extractor_TextItem::$_characterSpacing

The character spacing value.

$_end

protected SetaPDF_Core_Geometry_Matrix SetaPDF_Extractor_TextItem::$_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

protected SetaPDF_Core_Font SetaPDF_Extractor_TextItem::$_font

The font object used by this text item.

$_fontSize

protected float SetaPDF_Extractor_TextItem::$_fontSize

The font size.

$_no

protected string SetaPDF_Extractor_TextItem::$_no

An item identifier.

$_orientation

protected float SetaPDF_Extractor_TextItem::$_orientation

The orientation of this text item.

$_rawString

protected string SetaPDF_Extractor_TextItem::$_rawString = ''

The raw PDF string.

$_scaling

protected float SetaPDF_Extractor_TextItem::$_scaling

The scaling value.

$_spaceWidth

protected float SetaPDF_Extractor_TextItem::$_spaceWidth

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

$_start

protected SetaPDF_Core_Geometry_Matrix SetaPDF_Extractor_TextItem::$_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

protected SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::$_ul

The upper left point/vector of this text item.

$_wordSpacing

protected float SetaPDF_Extractor_TextItem::$_wordSpacing

The word spacing value.


Methods

__construct()

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

The constructor.

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

_getFontBBoxVector()

Get a font bounding box vector.

Parameters
$name
 
Exceptions

Throws SetaPDF_Core_Exception

cleanUp()

public SetaPDF_Extractor_TextItem::cleanUp (
void
): void

Release memory and cycled references

getBaseLineEnd()

Get the base line end vector.

getBaseLineStart()

Get the base line start vector.

getBounds()

Get the bounds of this text item.

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.

getLr()

Get lower right vector.

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.

getUr()

Get the upper right vector.

getUserSpaceSpaceWidth()

Get the width of the space character in user space.

Exceptions

Throws SetaPDF_Core_Exception

getWordSpacing()

Get the word spcaing 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