PDF-Signer

Serializer
in package

FinalYes

Writes PDF values in PDF syntax.

Table of Contents

Methods

number()  : string
A number, written without an exponent, since PDF has none, and without trailing zeros.
value()  : string
A value in PDF syntax.
dictionary()  : string
A `<<…>>` dictionary.
literal()  : string
A `(…)` string, escaping the bytes that would end or alter it.
name()  : string
A name, escaping with `#xx` any byte that is not a regular printable character.
stream()  : string
A stream: its dictionary with `/Length` set to the data's, then the data.

Methods

number()

A number, written without an exponent, since PDF has none, and without trailing zeros.

public static number(int|float $number) : string
Parameters
$number : int|float

The number.

Tags
throws
InvalidArgumentException

The number is infinite or not a number.

Return values
string

value()

A value in PDF syntax.

public static value(mixed $value) : string
Parameters
$value : mixed

A Name, PdfString, Dictionary, Stream, Reference, list, int, float, bool or null.

Tags
throws
InvalidArgumentException

The value has no PDF form.

Return values
string

dictionary()

A `<<…>>` dictionary.

private static dictionary(Dictionary $dictionary) : string
Parameters
$dictionary : Dictionary

The dictionary.

Return values
string

literal()

A `(…)` string, escaping the bytes that would end or alter it.

private static literal(string $bytes) : string
Parameters
$bytes : string

The string.

Return values
string

name()

A name, escaping with `#xx` any byte that is not a regular printable character.

private static name(string $value) : string
Parameters
$value : string

The name, without its slash.

Return values
string

stream()

A stream: its dictionary with `/Length` set to the data's, then the data.

private static stream(Stream $stream) : string
Parameters
$stream : Stream

The stream.

Return values
string
On this page

Search results