pub enum ObjRepr {
Null,
Bool(bool),
Int(i64),
Real(f64),
Name(Vec<u8>),
String(Vec<u8>),
Ref(u32),
Array(Vec<ObjRepr>),
Dict(Vec<(Vec<u8>, ObjRepr)>),
Stream(Vec<(Vec<u8>, ObjRepr)>, Vec<u8>),
}Expand description
A minimal sum type mirroring the PDF object grammar, just enough to
re-emit an imported object verbatim. Ref(u32) refers to another entry’s
local id in the same ImportedObjects table; the writer treats an
unresolved Ref as an importer bug rather than fetching it.
Variants§
Null
Bool(bool)
Int(i64)
Real(f64)
Name(Vec<u8>)
A PDF name’s raw bytes, without the leading / and with #xx
escapes already decoded (mirrors lopdf::Object::Name).
String(Vec<u8>)
A PDF string’s raw bytes (mirrors lopdf::Object::String, literal or
hex — both collapse to bytes here since we only ever re-emit them).
Ref(u32)
Array(Vec<ObjRepr>)
Dict(Vec<(Vec<u8>, ObjRepr)>)
Stream(Vec<(Vec<u8>, ObjRepr)>, Vec<u8>)
A stream object: its dictionary entries (excluding /Length, which
the writer derives) plus already-decompressed content bytes. The
writer decides filtering/compression at write time; the imported
content is kept in cleartext form here so no lopdf-specific codec
state needs to cross the boundary.