setasign\SetaPDF2\Extractor
Extractor The main class of the SetaPDF-Extractor Component
File: /SetaPDF v2/Extractor/Extractor.php
Old class name (alias):
\SetaPDF_Extractor
Class hierarchy
Summary
Constants
VERSION
Properties
$_document
protected \SetaPDF_Core_Document Extractor::$_document
The document instance
Methods
__construct()
public Extractor::__construct (
\SetaPDF_Core_Document $document,
?\SetaPDF_Extractor_Strategy_AbstractStrategy $strategy = null,
bool $ignoreFaultyStreams = false
)?\SetaPDF_Extractor_Strategy_AbstractStrategy $strategy = null,
bool $ignoreFaultyStreams = false
The constructor.
Parameters
- $document : \SetaPDF_Core_Document
- $strategy : ?\SetaPDF_Extractor_Strategy_AbstractStrategy
- $ignoreFaultyStreams : bool
getResultByPageNumber()
public Extractor::getResultByPageNumber (
int $pageNumber,
string $boundaryBox = null
): \SetaPDF_Extractor_Result_Collection|\SetaPDF_Extractor_Result_Words|\SetaPDF_Extractor_Result_WordGroups|string|string[]string $boundaryBox = null
Get the result by the default or individual strategy of a specific page.
Parameters
- $pageNumber : int
- $boundaryBox : string
If set the page boundary is used to limit the result to the rectangle of the given boundary. See \setasign\SetaPDF2\Core\PageBoundaries::XXX_BOX constants for possible values.
Exceptions
Throws \setasign\SetaPDF2\Core\Exception
See
getStrategy()
public Extractor::getStrategy (
void
): \SetaPDF_Extractor_Strategy_AbstractStrategy|\SetaPDF_Extractor_Strategy_PlainGet the extraction strategy.