Struct pdfium_render::page::PdfPage
source · [−]pub struct PdfPage<'a> { /* private fields */ }Expand description
A single page in a PdfDocument.
Implementations
Returns the zero-based page index of this PdfPage in its containing PdfDocument.
Returns PdfPageOrientation::Landscape if the width of this PdfPage is greater than its height; otherwise returns PdfPageOrientation::Portrait.
Returns true if this PdfPage has orientation PdfPageOrientation::Portrait.
Returns true if this PdfPage has orientation PdfPageOrientation::Landscape.
pub fn get_bitmap_with_config(
&self,
config: &PdfBitmapConfig
) -> Result<PdfBitmap<'_>, PdfiumError>
pub fn get_bitmap_with_config(
&self,
config: &PdfBitmapConfig
) -> Result<PdfBitmap<'_>, PdfiumError>
Returns a PdfBitmap using pixel dimensions, rotation settings, and rendering options configured in the given PdfBitmapConfig.
See also PdfPage::get_bitmap(), which directly creates a PdfBitmap object from this page using caller-specified pixel dimensions and page rotation settings.
pub fn get_bitmap(
&self,
width: u16,
height: u16,
rotation: Option<PdfBitmapRotation>
) -> Result<PdfBitmap<'_>, PdfiumError>
pub fn get_bitmap(
&self,
width: u16,
height: u16,
rotation: Option<PdfBitmapRotation>
) -> Result<PdfBitmap<'_>, PdfiumError>
Returns a PdfBitmap with the given pixel dimensions and render-time rotation for this PdfPage containing the rendered content of this PdfPage.
It is the responsibility of the caller to ensure the given pixel width and height correctly maintain the page’s aspect ratio.
See also PdfPage::get_bitmap_with_config(), which calculates the correct pixel dimensions, rotation settings, and rendering options to apply from a PdfBitmapConfig object.