pub struct PdfContext {
pub largest_object_number: u32,
pub header: PdfHeader,
pub trailer_info: TrailerInfo,
/* private fields */
}Expand description
PdfContext holds all indirect objects in a PDF document. It is the central registry for the document’s object graph.
Fields§
§largest_object_number: u32§header: PdfHeader§trailer_info: TrailerInfoImplementations§
Source§impl PdfContext
impl PdfContext
pub fn create() -> Self
Sourcepub fn register(&mut self, object: PdfObject) -> PdfRef
pub fn register(&mut self, object: PdfObject) -> PdfRef
Register an object and return its reference.
Sourcepub fn lookup(&self, pdf_ref: &PdfRef) -> Option<&PdfObject>
pub fn lookup(&self, pdf_ref: &PdfRef) -> Option<&PdfObject>
Look up an indirect object by reference.
Sourcepub fn enumerate_indirect_objects(&self) -> Vec<(PdfRef, &PdfObject)>
pub fn enumerate_indirect_objects(&self) -> Vec<(PdfRef, &PdfObject)>
Enumerate all indirect objects, sorted by object number.
Sourcepub fn object_count(&self) -> usize
pub fn object_count(&self) -> usize
Get number of indirect objects.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PdfContext
impl RefUnwindSafe for PdfContext
impl Send for PdfContext
impl Sync for PdfContext
impl Unpin for PdfContext
impl UnsafeUnpin for PdfContext
impl UnwindSafe for PdfContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more