setasign\SetaPDF2\Extractor\Strategy
AbstractStrategy Abstract class representing an extraction strategy.
File: /SetaPDF v2/Extractor/Strategy/AbstractStrategy.php
Old class name (alias):
\SetaPDF_Extractor_Strategy_AbstractStrategy
Class hierarchy
Summary
Properties
$_cleanStreamCallback
A callback that is called before processing a stream.
Methods
_accept()
Proxy method that forwards the call to a filter instance if available.
Parameters
- $textItem : \setasign\SetaPDF2\Extractor\TextItem
Exceptions
Throws \setasign\SetaPDF2\Extractor\Exception
Throws \setasign\SetaPDF2\Core\Exception
See
_filterTextItems()
?\setasign\SetaPDF2\Extractor\Filter\FilterInterface $filter = null
A helper method to filter arrays of text-items.
Parameters
- $textItems : \setasign\SetaPDF2\Extractor\TextItem[]
- $filter : ?\setasign\SetaPDF2\Extractor\Filter\FilterInterface
_getSubInstance()
Get an instance of the same strategy for processing another stream (e.g. a Form XObject stream).
Parameters
getResult()
Get the strategy specific result.
Parameters
- $stream : string
- $resources : \setasign\SetaPDF2\Core\Type\PdfDictionary
getResultByTextItems()
?\setasign\SetaPDF2\Extractor\Filter\FilterInterface $filter = null
Get the result by previously gathered text items.
Parameters
process()
Processes a stream through this strategy.
The result is an array of \setasign\SetaPDF2\Extractor\TextItem instances.
Parameters
- $stream : string
- $resources : \setasign\SetaPDF2\Core\Type\PdfDictionary
setBoundary()
Sets the boundary for the current strategy.
Parameters
- $boundary : ?\setasign\SetaPDF2\Core\Geometry\Rectangle
setCleanStreamCallback()
Set a callback that is called before processing a stream.
Parameters
- $callback : ?callable
setFilter()
Set a filter.
Parameters
setIgnoreFaultyStreams()
Define wether to continue when a stream cannot be decoded or not.
Parameters
- $ignoreFaultyStreams : bool