pub struct PdfDocument(/* private fields */);Expand description
A parsed PDF document. All pdf-forms operations work through this type.
lopdf’s Document is never exposed in the public API.
Implementations§
Source§impl PdfDocument
impl PdfDocument
Sourcepub fn page_count(&self) -> u32
pub fn page_count(&self) -> u32
Number of pages in the document (1-based count).
Sourcepub fn page_size(&self, page: u32) -> Result<PageSize, PdfError>
pub fn page_size(&self, page: u32) -> Result<PageSize, PdfError>
Dimensions of the given page (1-based page number).
Resolves the MediaBox by walking the Parent chain (depth-capped at 32) before falling back to an error. Correct for multi-page PDFs where the MediaBox lives on the page tree root node.
Auto Trait Implementations§
impl !RefUnwindSafe for PdfDocument
impl !UnwindSafe for PdfDocument
impl Freeze for PdfDocument
impl Send for PdfDocument
impl Sync for PdfDocument
impl Unpin for PdfDocument
impl UnsafeUnpin 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