pub struct PdfDocument {
ctx: Rc<PdfContext>,
doc: *mut FzDocument,
}Fields§
§ctx: Rc<PdfContext>§doc: *mut FzDocumentImplementations§
Trait Implementations§
Source§impl Document for PdfDocument
impl Document for PdfDocument
fn dims(&self, index: usize) -> Option<(f32, f32)>
fn pages_count(&self) -> usize
fn resolve_location(&mut self, loc: Location) -> Option<usize>
fn pixmap( &mut self, loc: Location, scale: f32, samples: usize, ) -> Option<(Pixmap, usize)>
fn toc(&mut self) -> Option<Vec<TocEntry>>
fn chapter<'a>( &mut self, offset: usize, toc: &'a [TocEntry], ) -> Option<(&'a TocEntry, f32)>
fn chapter_relative<'a>( &mut self, offset: usize, dir: CycleDir, toc: &'a [TocEntry], ) -> Option<&'a TocEntry>
fn metadata(&self, key: &str) -> Option<String>
fn words(&mut self, loc: Location) -> Option<(Vec<BoundedText>, usize)>
fn lines(&mut self, loc: Location) -> Option<(Vec<BoundedText>, usize)>
fn images(&mut self, loc: Location) -> Option<(Vec<Boundary>, usize)>
fn links(&mut self, loc: Location) -> Option<(Vec<BoundedText>, usize)>
fn title(&self) -> Option<String>
fn is_reflowable(&self) -> bool
fn layout(&mut self, width: u32, height: u32, font_size: f32, dpi: u16)
fn set_text_align(&mut self, _text_align: TextAlign)
fn set_font_family(&mut self, _family_name: &str, _search_path: &str)
fn set_margin_width(&mut self, _width: i32)
fn set_line_height(&mut self, _line_height: f32)
fn set_hyphen_penalty(&mut self, _hyphen_penalty: i32)
fn set_stretch_tolerance(&mut self, _stretch_tolerance: f32)
fn set_ignore_document_css(&mut self, ignore: bool)
fn has_synthetic_page_numbers(&self) -> bool
fn save(&self, _path: &str) -> Result<(), Error>
fn preview_pixmap( &mut self, width: f32, height: f32, samples: usize, ) -> Option<Pixmap>
Source§impl Drop for PdfDocument
impl Drop for PdfDocument
impl Send for PdfDocument
impl Sync for PdfDocument
Auto Trait Implementations§
impl Freeze for PdfDocument
impl RefUnwindSafe for PdfDocument
impl Unpin for PdfDocument
impl UnwindSafe for PdfDocument
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.