pub enum Element {
Header {
version: (u8, u8),
span: Span,
},
IndirectObject {
r: ObjRef,
object: Object,
span: Span,
in_objstm: Option<(ObjRef, Span)>,
},
XrefSection {
kind: XrefKind,
span: Span,
entries: usize,
},
Trailer {
dict: Dict,
span: Span,
},
StartXref {
offset: u64,
span: Span,
},
Eof {
span: Span,
},
Page {
index: usize,
r: ObjRef,
},
Font {
page: Option<usize>,
r: ObjRef,
subtype: Name,
base_font: Option<Name>,
},
Image {
page: Option<usize>,
r: ObjRef,
width: u32,
height: u32,
},
Annotation {
page: usize,
r: ObjRef,
subtype: Name,
},
ContentOp {
page: usize,
op: Op,
span_in_content: Span,
},
}Expand description
One element of a document, physical or logical.
Variants§
Header
The %PDF-x.y header.
IndirectObject
One indirect object.
Fields
XrefSection
One cross-reference section (table or stream).
Trailer
The trailer: the merged trailer dictionary plus the byte range of the
newest trailer region (classic trailer << … >>, or the newest
cross-reference stream object when no classic trailer exists).
The dict is the MERGED trailer dictionary (keys from newer sections win),
while span covers only the newest trailer region — so unlike other
physical elements, re-parsing the bytes at span does not reproduce dict.
StartXref
The startxref keyword and its offset operand.
Eof
The %%EOF marker.
Page
One page (logical).
Font
One font referenced from a page’s resources.
Image
One image XObject referenced from a page’s resources.
Annotation
One annotation on a page.
ContentOp
One content-stream operator of a page.