Skip to main content

Module serialize

Module serialize 

Source
Expand description

Writing objects back as PDF syntax.

Output is deterministic (dictionary keys are sorted, numbers have one spelling) so the same object always serializes to the same bytes.

Functionsยง

to_bytes
object in PDF syntax, as a byte vector.
write_object
Appends object in PDF syntax. A stream is written as its dictionary followed by stream, its raw bytes and endstream.