SetaPDF_Extractor_TextItem A text item.

File: /SetaPDF/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 ( $rawString $rawString, SetaPDF_Core_Font $font, $fontSize $fontSize, $characterSpacing $characterSpacing, $wordSpacing $wordSpacing, $scaling $scaling, SetaPDF_Core_Geometry_Matrix $start, SetaPDF_Core_Geometry_Matrix $end, $no $no )

The constructor.

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

_getFontBBoxVector()

protected SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::_getFontBBoxVector ( $name $name )

Get a font bounding box vector.

Parameters
$name : $name
 
Exceptions

Throws SetaPDF_Core_Exception

cleanUp()

public void SetaPDF_Extractor_TextItem::cleanUp ( void )

Release memory and cycled references

getBaseLineEnd()

public SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::getBaseLineEnd ( void )

Get the base line end vector.

getBaseLineStart()

public SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::getBaseLineStart ( void )

Get the base line start vector.

getBounds()

public SetaPDF_Extractor_Result_Bounds SetaPDF_Extractor_TextItem::getBounds ( void )

Get the bounds of this text item.

getCharacterSpacing()

public float SetaPDF_Extractor_TextItem::getCharacterSpacing ( void )

Get the character spacing.

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

getEndMatrix()

public SetaPDF_Core_Geometry_Matrix SetaPDF_Extractor_TextItem::getEndMatrix ( void )

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

getFilterId()

public null|string SetaPDF_Extractor_TextItem::getFilterId ( void )

Get the filter id by which this item was accepted.

getFont()

public SetaPDF_Core_Font SetaPDF_Extractor_TextItem::getFont ( void )

Get the text items font object.

getFontSize()

public float SetaPDF_Extractor_TextItem::getFontSize ( void )

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()

public SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::getLl ( void )

Get the lower left vector.

getLr()

public SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::getLr ( void )

Get lower right vector.

getNo()

public string SetaPDF_Extractor_TextItem::getNo ( void )

Get the text item identification.

getOrientation()

public float SetaPDF_Extractor_TextItem::getOrientation ( void )

Get the orientation of the text item.

getRawString()

public string SetaPDF_Extractor_TextItem::getRawString ( void )

Get the raw string.

getScaling()

public float SetaPDF_Extractor_TextItem::getScaling ( void )

Get the scaling value.

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

getStartMatrix()

public SetaPDF_Core_Geometry_Matrix SetaPDF_Extractor_TextItem::getStartMatrix ( void )

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

getString()

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

Get the string in a specific encoding.

Parameters
$encoding : string
 

getUl()

public SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::getUl ( void )

Get the upper left vector.

getUr()

public SetaPDF_Core_Geometry_Vector SetaPDF_Extractor_TextItem::getUr ( void )

Get the upper right vector.

getUserSpaceSpaceWidth()

public float SetaPDF_Extractor_TextItem::getUserSpaceSpaceWidth ( void )

Get the width of the space character in user space.

Exceptions

Throws SetaPDF_Core_Exception

getWordSpacing()

public float SetaPDF_Extractor_TextItem::getWordSpacing ( void )

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 void SetaPDF_Extractor_TextItem::setFilterId ( string $filterId )

Sets the filter id by which this item was accepted.

Parameters
$filterId : string