PDF-Signer

Filters
in package

FinalYes

Decodes stream data through the filters its dictionary names.

Only what reading a document's structure needs is supported: Flate, with the PNG and TIFF predictors that cross-reference and object streams use, and the two ASCII encodings. Page content is never decoded.

Table of Contents

Methods

decode()  : string
Decodes a stream's data.
ascii85()  : string
Decodes base-85 groups up to `~>`, with `z` standing for four zero bytes.
asciiHex()  : string
Decodes hex digits up to `>`; an odd final digit is followed by an implied 0.
base85Word()  : string
The first `$bytes` bytes of the 32-bit word five base-85 digits make.
inflate()  : string
Inflates zlib data, falling back to a raw deflate stream as some writers produce.
paeth()  : int
The PNG Paeth predictor: whichever neighbour is closest to left + up − up-left.
predict()  : string
Undoes a PNG (10–15) or TIFF (2) predictor.

Methods

decode()

Decodes a stream's data.

public static decode(Stream $stream[, callable(mixed): mixed|null $resolve = null ]) : string
Parameters
$stream : Stream

The stream.

$resolve : callable(mixed): mixed|null = null

Resolves indirect values in the dictionary.

Tags
throws
PdfException

A filter is not supported, or the data is damaged.

Return values
string

ascii85()

Decodes base-85 groups up to `~>`, with `z` standing for four zero bytes.

private static ascii85(string $data) : string
Parameters
$data : string

The encoded bytes.

Return values
string

asciiHex()

Decodes hex digits up to `>`; an odd final digit is followed by an implied 0.

private static asciiHex(string $data) : string
Parameters
$data : string

The encoded bytes.

Return values
string

base85Word()

The first `$bytes` bytes of the 32-bit word five base-85 digits make.

private static base85Word(array<int, int> $digits, int $bytes) : string
Parameters
$digits : array<int, int>

Five digits, 0–84.

$bytes : int
Return values
string

inflate()

Inflates zlib data, falling back to a raw deflate stream as some writers produce.

private static inflate(string $data) : string
Parameters
$data : string

The compressed bytes.

Return values
string

paeth()

The PNG Paeth predictor: whichever neighbour is closest to left + up − up-left.

private static paeth(int $left, int $up, int $upLeft) : int
Parameters
$left : int
$up : int
$upLeft : int
Return values
int

predict()

Undoes a PNG (10–15) or TIFF (2) predictor.

private static predict(string $data, Dictionary|null $options) : string
Parameters
$data : string

The inflated bytes.

$options : Dictionary|null

The filter's /DecodeParms.

Return values
string
On this page

Search results