Table of contents
Namespace: Com\Tecnick\Pdf\Filter
class Filter
Source: src/Filter.php:34
Decoder for the PDF stream filters (PDF 32000-1:2008 §7.4).
Methods
decode()
Decode the data with a single filter.
public decode(string|FilterType $filter, string $data, array<string,mixed> $params = []): string
Parameters:
$filter(string|FilterType): Filter name or FilterType case; an empty name is a pass-through.$data(string): Data to decode.$params(array<string,mixed>): Optional DecodeParms dictionary for the filter.
Returns: string: Decoded data.
Throws:
Source: src/Filter.php:47
decodeAll()
Decode the data with a chain of filters, applied in order.
public decodeAll(
(string|FilterType)[] $filters,
string $data,
array<array-key,mixed> $params = []
): string
Parameters:
$filters((string|FilterType)[]): Filters to apply in order.$data(string): Data to decode.$params(array<array-key,mixed>): Optional DecodeParms: a single dictionary applied to every filter, or a list holding one dictionary (or null) per filter, consumed positionally, as /DecodeParms parallel to /Filter. An entry that is not a dictionary leaves the corresponding filter without parameters.
Returns: string: Decoded data.
Throws:
Source: src/Filter.php:87