SetaPDF_Extractor_Sorter The abstract sorter class.
File: /SetaPDF v2/Extractor/Sorter.php
Class hierarchy
Summary
Properties
$_matrix
protected null|SetaPDF_Core_Geometry_Matrix SetaPDF_Extractor_Sorter::$_matrix
A temporary matrix used in the sort process.
Methods
groupByLines()
abstract public SetaPDF_Extractor_Sorter::groupByLines (
SetaPDF_Extractor_TextItem[] $textItems
): arrayGroups all text items by lines.
Parameters
- $textItems : SetaPDF_Extractor_TextItem[]
The text items
horizontallyThenVertically()
A sort callback that sort first horizontally then vertically.
Parameters
Exceptions
Throws SetaPDF_Core_Exception
See
isOnSameLine()
abstract public SetaPDF_Extractor_Sorter::isOnSameLine (
SetaPDF_Extractor_TextItem $a, SetaPDF_Extractor_TextItem $b [, SetaPDF_Core_Geometry_Matrix $matrix = null ]
): boolChecks whether two items are on the same line or not.
This method has to be implemented by the extending classes.
Parameters
- $a : SetaPDF_Extractor_TextItem
- $b : SetaPDF_Extractor_TextItem
- $matrix : SetaPDF_Core_Geometry_Matrix
itemsJoining()
Checks if two items joining each other.
Parameters
- $a : SetaPDF_Extractor_TextItem
Item A.
- $b : SetaPDF_Extractor_TextItem
Item B.
- $spaceWidthFactor : float
The space width factor.
Exceptions
Throws SetaPDF_Core_Exception
verticallyThenHorizontally()
A sort callback that sort first vertically then horizontally.
Parameters
Exceptions
Throws SetaPDF_Core_Exception