pub struct PdfPage {
pub id: ObjectId,
pub media_box: Rect,
pub crop_box: Rect,
pub rotate: i32,
pub resources: ResourceDict,
pub contents: Vec<ObjectId>,
pub annots: Vec<ObjectId>,
}Fields§
§id: ObjectId§media_box: Rect§crop_box: Rect§rotate: i32§resources: ResourceDict§contents: Vec<ObjectId>§annots: Vec<ObjectId>Annotation object ids from /Annots, parsed but not yet rendered.
Implementations§
Source§impl PdfPage
impl PdfPage
pub fn from_object(file: &PdfFile, page_id: ObjectId) -> Result<Self>
pub fn width(&self) -> f64
pub fn height(&self) -> f64
Sourcepub fn effective_box(&self) -> Rect
pub fn effective_box(&self) -> Rect
The rectangle the page is rendered into: /CropBox intersected with
/MediaBox. Per spec a CropBox extending beyond the MediaBox is
clamped to it; an empty or non-overlapping CropBox falls back to the
full MediaBox.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PdfPage
impl RefUnwindSafe for PdfPage
impl Send for PdfPage
impl Sync for PdfPage
impl Unpin for PdfPage
impl UnsafeUnpin for PdfPage
impl UnwindSafe for PdfPage
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