SetaPDF_Extractor_Filter_FontSize A font size filter.

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

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

Class hierarchy

Implements

Summary

Constants

MODE_BETWEEN

A mode constant.

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

A mode constant.

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

A mode constant.

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

MODE_LARGER

A mode constant.

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

MODE_LARGER_OR_EQUALS

A mode constant.

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

MODE_SMALLER

A mode constant.

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

MODE_SMALLER_OR_EQUALS

A mode constant.

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


Properties

$_fontSize

protected null|int|float|int[]|float[] 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 (
float|float[] $fontSize [, string $mode = SetaPDF_Extractor_Filter_FontSize::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 : float|float[]
 
$mode : string
 
$id : null
 

accept()

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

Parameters
$textItem : SetaPDF_Extractor_TextItem
 
See

getFontSize()

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

Get the font size data.

getId()

public SetaPDF_Extractor_Filter_FontSize::getId (
void
): null|string

Get the filter id.

getMode()

Get the mode.