pub struct PdfDocument { /* private fields */ }Expand description
Wraps PDFDocument.
Implementations§
Source§impl PdfDocument
impl PdfDocument
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Wraps PDFDocument(data:).
Sourcepub fn info(&self) -> Result<PdfDocumentInfo>
pub fn info(&self) -> Result<PdfDocumentInfo>
Wraps the corresponding PDFDocument API.
Sourcepub fn attributes(&self) -> Result<PdfDocumentAttributes>
pub fn attributes(&self) -> Result<PdfDocumentAttributes>
Wraps the corresponding PDFDocument API.
Sourcepub fn page_count(&self) -> usize
pub fn page_count(&self) -> usize
Wraps the corresponding PDFDocument API.
Sourcepub fn page_index(&self, page: &PdfPage) -> Option<usize>
pub fn page_index(&self, page: &PdfPage) -> Option<usize>
Wraps the corresponding PDFDocument API.
Sourcepub fn outline_root(&self) -> Option<PdfOutline>
pub fn outline_root(&self) -> Option<PdfOutline>
Wraps the corresponding PDFDocument API.
Sourcepub fn set_outline_root(&self, outline: Option<&PdfOutline>) -> Result<()>
pub fn set_outline_root(&self, outline: Option<&PdfOutline>) -> Result<()>
Wraps the corresponding PDFDocument API.
Sourcepub fn outline_item_for_selection(
&self,
selection: &PdfSelection,
) -> Option<PdfOutline>
pub fn outline_item_for_selection( &self, selection: &PdfSelection, ) -> Option<PdfOutline>
Wraps the corresponding PDFDocument API.
Sourcepub fn selection_for_entire_document(&self) -> Option<PdfSelection>
pub fn selection_for_entire_document(&self) -> Option<PdfSelection>
Wraps the corresponding PDFDocument API.
Sourcepub fn selection_from_page_points(
&self,
start_page: &PdfPage,
start_point: PdfPoint,
end_page: &PdfPage,
end_point: PdfPoint,
) -> Option<PdfSelection>
pub fn selection_from_page_points( &self, start_page: &PdfPage, start_point: PdfPoint, end_page: &PdfPage, end_point: PdfPoint, ) -> Option<PdfSelection>
Wraps the corresponding PDFDocument API.
Sourcepub fn selection_from_page_points_with_granularity(
&self,
start_page: &PdfPage,
start_point: PdfPoint,
end_page: &PdfPage,
end_point: PdfPoint,
granularity: PdfSelectionGranularity,
) -> Option<PdfSelection>
pub fn selection_from_page_points_with_granularity( &self, start_page: &PdfPage, start_point: PdfPoint, end_page: &PdfPage, end_point: PdfPoint, granularity: PdfSelectionGranularity, ) -> Option<PdfSelection>
Wraps the corresponding PDFDocument API.
Sourcepub fn selection_from_page_characters(
&self,
start_page: &PdfPage,
start_character: usize,
end_page: &PdfPage,
end_character: usize,
) -> Option<PdfSelection>
pub fn selection_from_page_characters( &self, start_page: &PdfPage, start_character: usize, end_page: &PdfPage, end_character: usize, ) -> Option<PdfSelection>
Wraps the corresponding PDFDocument API.
Sourcepub fn set_delegate(
&self,
delegate: Option<&PdfDocumentDelegateHandle>,
) -> Result<()>
pub fn set_delegate( &self, delegate: Option<&PdfDocumentDelegateHandle>, ) -> Result<()>
Wraps the corresponding PDFDocument API.
Sourcepub fn write_to_url(&self, path: impl AsRef<Path>) -> Result<()>
pub fn write_to_url(&self, path: impl AsRef<Path>) -> Result<()>
Wraps the corresponding PDFDocument API.
Sourcepub fn write_to_url_with_options(
&self,
path: impl AsRef<Path>,
options: &PdfDocumentWriteOptions,
) -> Result<()>
pub fn write_to_url_with_options( &self, path: impl AsRef<Path>, options: &PdfDocumentWriteOptions, ) -> Result<()>
Wraps the corresponding PDFDocument API.
Sourcepub fn insert_page(&self, page: &PdfPage, index: usize) -> Result<()>
pub fn insert_page(&self, page: &PdfPage, index: usize) -> Result<()>
Wraps the corresponding PDFDocument API.
Sourcepub fn remove_page(&self, index: usize) -> Result<()>
pub fn remove_page(&self, index: usize) -> Result<()>
Wraps the corresponding PDFDocument API.
Trait Implementations§
Source§impl Clone for PdfDocument
impl Clone for PdfDocument
Source§fn clone(&self) -> PdfDocument
fn clone(&self) -> PdfDocument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PdfDocument
impl RefUnwindSafe for PdfDocument
impl !Send for PdfDocument
impl !Sync for PdfDocument
impl Unpin for PdfDocument
impl UnsafeUnpin 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