SetaPDF_Extractor_Sorter The abstract sorter class.

File: /SetaPDF v2/Extractor/Sorter.php

Class hierarchy

Summary

Properties

$_matrix

protected SetaPDF_Core_Geometry_Matrix SetaPDF_Extractor_Sorter::$_matrix

A temporary matrix used in the sort process.


Methods

groupByLines()

Groups all text items by lines.

Parameters
$textItems : SetaPDF_Extractor_TextItem[]

The text items

horizontallyThenVertically()

isOnSameLine()

Checks whether two items are on the same line or not.

This method has to be implemented by the extending classes.

Parameters
$a : SetaPDF_Extractor_Result_CompareableInterface
 
$b : SetaPDF_Extractor_Result_CompareableInterface
 
$matrix : SetaPDF_Core_Geometry_Matrix
 

itemsJoining()

Checks if two items joining each other.

Parameters
$prevItem : SetaPDF_Extractor_Result_CompareableInterface

The left item.

$item : SetaPDF_Extractor_Result_CompareableInterface

The right item.

$spaceWidthFactor : float

The space width factor.

verticallyThenHorizontally()