Skip to main content

Module objects

Module objects 

Source
Expand description

PDF object model and serializer (ISO 32000-1 §7.3 / §7.5).

Round 1 ships the minimum surface a single-page writer needs: booleans, numerics, names, strings, arrays, dictionaries, streams, null, indirect references. The crate emits only these and walks a Document of IndirectObjects into the standard header / body / xref / trailer layout (§7.5.2 — §7.5.5).

No parser. The writer never reads back any byte it emits.

Structs§

Dict
A PDF dictionary << /Key Value >>. Iteration order is insertion order so generated PDFs are byte-stable across runs.
Document
The whole PDF document — an append-only list of indirect objects plus a /Root reference (and optional /Info reference) for the trailer dictionary.
IndirectObject
One indirect object stored in a Document. Each gets its own <n> <gen> obj … endobj block in the output.
ObjectId
Tagged identifier of an indirect object inside a Document.
Stream
A PDF stream — its dictionary describes the payload and is required to carry /Length. The serializer fills /Length from data.len() at write time so callers don’t have to.

Enums§

Object
A PDF “any” value — every primitive plus the composite ones.

Functions§

write_dict_to
Round-30 sig-writer entry point — serialise one Dict into a caller-provided buffer using the same byte sequence the document writer emits. Used by the /Sig writer’s incremental-update section so the appended-revision objects (Catalog override, AcroForm, Sig field) come out byte-stable with the rest of the file.