pub struct ExportOptions { /* private fields */ }Expand description
What export_pages writes.
use laminapdf_render::{ExportFormat, ExportOptions};
let options = ExportOptions::new(ExportFormat::Png).with_dpi(150.0);
assert_eq!(options.dpi(), 150.0);Added in 0.2.0.
Implementations§
Source§impl ExportOptions
impl ExportOptions
Sourcepub fn new(format: ExportFormat) -> Self
pub fn new(format: ExportFormat) -> Self
format at 150 dpi, on white, with the default RenderFlags.
Added in 0.2.0.
Sourcepub const fn with_dpi(self, dpi: f64) -> Self
pub const fn with_dpi(self, dpi: f64) -> Self
The resolution, in pixels per inch (72 is one pixel per point).
Added in 0.2.0.
Sourcepub const fn with_background(self, background: Option<Rgba8>) -> Self
pub const fn with_background(self, background: Option<Rgba8>) -> Self
The colour under the page; None keeps PNG and TIFF transparent where nothing is drawn.
JPEG has no transparency, so it always goes on an opaque colour: this one, or white.
Added in 0.2.0.
Sourcepub const fn with_flags(self, flags: RenderFlags) -> Self
pub const fn with_flags(self, flags: RenderFlags) -> Self
What is drawn besides the page content (annotations, form widgets, print intent).
Added in 0.2.0.
Sourcepub const fn format(&self) -> ExportFormat
pub const fn format(&self) -> ExportFormat
The format.
Added in 0.2.0.
Trait Implementations§
Source§impl Clone for ExportOptions
impl Clone for ExportOptions
impl Copy for ExportOptions
Source§impl Debug for ExportOptions
impl Debug for ExportOptions
Source§impl PartialEq for ExportOptions
impl PartialEq for ExportOptions
impl StructuralPartialEq for ExportOptions
Auto Trait Implementations§
impl Forget for ExportOptions
impl Freeze for ExportOptions
impl Move for ExportOptions
impl RefUnwindSafe for ExportOptions
impl Send for ExportOptions
impl Sync for ExportOptions
impl Unpin for ExportOptions
impl UnsafeUnpin for ExportOptions
impl UnwindSafe for ExportOptions
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