SetaPDF_Extractor_Strategy_AbstractStrategy Abstract class representing an extraction strategy.

File: /SetaPDF v2/Extractor/Strategy/AbstractStrategy.php

Class hierarchy

Summary

Properties

$_cleanStreamCallback

A callback that is called before processing a stream.

$_ignoreFaultyStreams

Defines wether to continue when a stream cannot be decoded or not.


Methods

__construct()

_accept()

Proxy method that forwards the call to a filter instance if available.

Parameters
$textItem : SetaPDF_Extractor_TextItem
 
Exceptions

Throws SetaPDF_Extractor_Exception

Throws SetaPDF_Core_Exception

See

_getSubInstance()

Get an instance of the same strategy for processing another stream (e.g. a Form XObject stream).

Parameters
$gs : SetaPDF_Core_Canvas_GraphicState
 

getCleanStreamCallback()

Get the callback that is called before a stream is processed.

getResult()

abstract public SetaPDF_Extractor_Strategy_AbstractStrategy::getResult (
string $stream, SetaPDF_Core_Type_Dictionary $resources
): mixed

Get the strategy specific result.

Parameters
$stream : string
 
$resources : SetaPDF_Core_Type_Dictionary
 

process()

Processes a stream through this strategy.

The result is an array of SetaPDF_Extractor_TextItem instances.

Parameters
$stream : string
 
$resources : SetaPDF_Core_Type_Dictionary
 

setBoundary()

Sets the boundary for the current strategy.

Parameters
$boundary : SetaPDF_Core_Geometry_Rectangle|null
 

setCleanStreamCallback()

public SetaPDF_Extractor_Strategy_AbstractStrategy::setCleanStreamCallback (
[ callable|null $callback = null ]
): void

Set a callback that is called before processing a stream.

Parameters
$callback : callable|null
 

setFilter()

setIgnoreFaultyStreams()

public SetaPDF_Extractor_Strategy_AbstractStrategy::setIgnoreFaultyStreams (
boolean $ignoreFaultyStreams
): void

Define wether to continue when a stream cannot be decoded or not.

Parameters
$ignoreFaultyStreams : boolean