Skip to main content

Module writer

Module writer 

Source
Expand description

The object-level PDF writer: numbered objects in, finished file bytes out. Handles the header, stream /Length bookkeeping, optional Flate compression, object streams, both cross-reference styles, the trailer and a deterministic /ID.

Determinism contract: the same sequence of calls with the same options produces byte-identical output. Nothing here reads clocks or RNGs; the /ID derives from a SHA-256 of the emitted body.

Structs§

WriteOptions
Options governing file emission.
Writer
Accumulates numbered objects and serializes them into a complete PDF file. Objects are numbered in the order they are first claimed (put, put_stream, or reserve), starting at 1, generation 0.

Enums§

XrefStyle
Which cross-reference flavor finish emits.