pub struct OverlayBase {
pub prev: u64,
pub kind: XrefStyle,
pub size: u32,
pub root: ObjRef,
pub info: Option<ObjRef>,
pub id: Option<Object>,
}Expand description
The facts about a base document an update needs, read once from its
trailer and its own newest cross-reference section: refuses an
encrypted base or one missing /Root or a startxref to chain from.
Fields§
§prev: u64Byte offset of the base’s own newest cross-reference section, named
as the appended section’s /Prev.
kind: XrefStyleStyle of that newest section, read from the section itself rather
than the merged trailer (a hybrid base’s merged trailer carries
/Type /XRef inherited from its /XRefStm, even though its newest
section, per startxref, is the classic table).
size: u32The next free object number: the base’s declared /Size, raised to
one past its highest addressed object number.
root: ObjRefThe base’s catalog.
info: Option<ObjRef>The base’s document information dictionary, when present.
id: Option<Object>The base trailer’s /ID array, cloned.
Implementations§
Source§impl OverlayBase
impl OverlayBase
Sourcepub fn from_document(doc: &Document) -> Result<OverlayBase>
pub fn from_document(doc: &Document) -> Result<OverlayBase>
Reads doc’s trailer and newest cross-reference section: the
section’s offset and kind come from doc.xref().newest_section(),
already recorded while core loaded the file, falling back to
re-deriving them from startxref and parse_section_at when the
document has none (a recovery-scan base refuses with
Error::MissingStartxref on this fallback path). Refuses any
encrypted doc outright, wider than
crate::importer::Importer::new’s own locked-only refusal:
appending onto an already-encrypted base is a feature this crate
does not yet implement, so every encrypted base is refused here for
now, password-opened or not.
Trait Implementations§
Source§impl Clone for OverlayBase
impl Clone for OverlayBase
Source§fn clone(&self) -> OverlayBase
fn clone(&self) -> OverlayBase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more