pub struct Reader<'a> {
pub buffer: &'a [u8],
pub document: Document,
pub encryption_state: Option<EncryptionState>,
pub raw_objects: BTreeMap<ObjectId, Vec<u8>>,
pub password: Option<String>,
pub strict: bool,
}Fields§
§buffer: &'a [u8]§document: Document§encryption_state: Option<EncryptionState>§raw_objects: BTreeMap<ObjectId, Vec<u8>>§password: Option<String>§strict: boolImplementations§
Source§impl Reader<'_>
impl Reader<'_>
Sourcepub fn read_metadata(self) -> Result<PdfMetadata, Error>
pub fn read_metadata(self) -> Result<PdfMetadata, Error>
Read metadata (title and page count) without loading the entire document. This is much faster for large PDFs when you only need basic information.
For encrypted PDFs, use Document::load_metadata_with_password() instead.
Sourcepub fn read(self, filter_func: Option<FilterFunc>) -> Result<Document, Error>
pub fn read(self, filter_func: Option<FilterFunc>) -> Result<Document, Error>
Read whole document.
pub fn get_object( &self, id: ObjectId, already_seen: &mut HashSet<ObjectId>, ) -> Result<Object, Error>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Reader<'a>
impl<'a> !UnwindSafe for Reader<'a>
impl<'a> Freeze for Reader<'a>
impl<'a> Send for Reader<'a>
impl<'a> Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> UnsafeUnpin for Reader<'a>
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