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.
- Indirect
Object - One indirect object stored in a
Document. Each gets its own<n> <gen> obj … endobjblock in the output. - Object
Id - 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/Lengthfromdata.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
Dictinto a caller-provided buffer using the same byte sequence the document writer emits. Used by the/Sigwriter’s incremental-update section so the appended-revision objects (Catalog override, AcroForm, Sig field) come out byte-stable with the rest of the file.