SetaPDF_Extractor_Filter_FontSize A font size filter.

File: /SetaPDF/Extractor/Filter/FontSize.php

This filter allows you to text in view to its font size.

Class hierarchy

Implements

Summary

Constants

MODE_BETWEEN

Defines that the font size needs to be between the given filter values. If this mode is used the filter value needs to be an array. Otherwise the mode will be the same as SetaPDF_Extractor_Filter_FontSize::MODE_EQUALS

MODE_BETWEEN_OR_EQUALS

Defines that the font size needs to be between or equal to the given filter values. If this mode is used the filter value needs to be an array. Otherwise the mode will be the same as SetaPDF_Extractor_Filter_FontSize::MODE_EQUALS

MODE_EQUALS

Defines that the font size needs to be equal to the given filter value.

MODE_LARGER

Defines that the font size needs to be larger than the given filter value.

MODE_LARGER_OR_EQUALS

Defines that the font size needs to be larger or equal than the given filter value.

MODE_SMALLER

Defines that the font size needs to be smaller than the given filter value.

MODE_SMALLER_OR_EQUALS

Defines that the font size needs to be smaller or equal than the given filter value.


Properties

$_fontSize

protected null|number|number[] SetaPDF_Extractor_Filter_FontSize::$_fontSize

The font size data to filter by.

$_id

protected string|null SetaPDF_Extractor_Filter_FontSize::$_id

The id of this filter.

$_mode

protected string SetaPDF_Extractor_Filter_FontSize::$_mode = '=='

The mode to work with.

$_page


Methods

__construct()

public SetaPDF_Extractor_Filter_FontSize::__construct ( $fontSize $fontSize [, string $mode = self::MODE_EQUALS [, null $id = null ]] )

The constructor.

This filter can work in different modes which are specified through class constants:

1. MODE_EQUALS: The font size equals the filter value. 2. MODE_BETWEEN: The font size is between 2 given filter values (pass an array as $fontSize) 3. MODE_SMALLER: The font size is smaler than the filter value. 4. MODE_LARGER: The font size is larger than the filter value.

Parameters
$fontSize : $fontSize
 
$mode : string
 
$id : null
 

accept()

public bool|string SetaPDF_Extractor_Filter_FontSize::accept ( SetaPDF_Extractor_TextItem $textItem )

Method that is called to decide if a text item accepted or not.

Parameters
$textItem : SetaPDF_Extractor_TextItem
 
Exceptions

Throws SetaPDF_Extractor_Exception

See

getFontSize()

public array|float|null|number|number[] SetaPDF_Extractor_Filter_FontSize::getFontSize ( void )

Get the font size data.

getId()

public null|string SetaPDF_Extractor_Filter_FontSize::getId ( void )

Get the filter id.

getMode()

public string SetaPDF_Extractor_Filter_FontSize::getMode ( void )

Get the mode.