pub struct OptimizedPdfReader<R: Read + Seek> { /* private fields */ }Expand description
Optimized PDF reader with LRU caching
Implementations§
Source§impl<R: Read + Seek> OptimizedPdfReader<R>
impl<R: Read + Seek> OptimizedPdfReader<R>
Sourcepub fn options(&self) -> &ParseOptions
pub fn options(&self) -> &ParseOptions
Get parsing options
Sourcepub fn memory_stats(&self) -> &MemoryStats
pub fn memory_stats(&self) -> &MemoryStats
Get memory statistics
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the object cache
Source§impl OptimizedPdfReader<File>
impl OptimizedPdfReader<File>
Sourcepub fn open<P: AsRef<Path>>(path: P) -> ParseResult<Self>
pub fn open<P: AsRef<Path>>(path: P) -> ParseResult<Self>
Open a PDF file from a path with memory optimization
Sourcepub fn open_with_memory<P: AsRef<Path>>(
path: P,
memory_options: MemoryOptions,
) -> ParseResult<Self>
pub fn open_with_memory<P: AsRef<Path>>( path: P, memory_options: MemoryOptions, ) -> ParseResult<Self>
Open a PDF file with custom memory options
Sourcepub fn open_strict<P: AsRef<Path>>(path: P) -> ParseResult<Self>
pub fn open_strict<P: AsRef<Path>>(path: P) -> ParseResult<Self>
Open a PDF file with strict parsing
Source§impl<R: Read + Seek> OptimizedPdfReader<R>
impl<R: Read + Seek> OptimizedPdfReader<R>
Sourcepub fn new(reader: R) -> ParseResult<Self>
pub fn new(reader: R) -> ParseResult<Self>
Create a new PDF reader from a reader
Sourcepub fn new_with_options(
reader: R,
options: ParseOptions,
memory_options: MemoryOptions,
) -> ParseResult<Self>
pub fn new_with_options( reader: R, options: ParseOptions, memory_options: MemoryOptions, ) -> ParseResult<Self>
Create a new PDF reader with custom parsing and memory options
Sourcepub fn version(&self) -> &PdfVersion
pub fn version(&self) -> &PdfVersion
Get the PDF version
Sourcepub fn catalog(&mut self) -> ParseResult<&PdfDictionary>
pub fn catalog(&mut self) -> ParseResult<&PdfDictionary>
Get the document catalog
Sourcepub fn info(&mut self) -> ParseResult<Option<&PdfDictionary>>
pub fn info(&mut self) -> ParseResult<Option<&PdfDictionary>>
Get the document info dictionary
Sourcepub fn get_object(
&mut self,
obj_num: u32,
gen_num: u16,
) -> ParseResult<&PdfObject>
pub fn get_object( &mut self, obj_num: u32, gen_num: u16, ) -> ParseResult<&PdfObject>
Get an object by reference
Auto Trait Implementations§
impl<R> Freeze for OptimizedPdfReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for OptimizedPdfReader<R>where
R: RefUnwindSafe,
impl<R> Send for OptimizedPdfReader<R>where
R: Send,
impl<R> Sync for OptimizedPdfReader<R>where
R: Sync,
impl<R> Unpin for OptimizedPdfReader<R>where
R: Unpin,
impl<R> UnwindSafe for OptimizedPdfReader<R>where
R: UnwindSafe,
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