pub struct PdfExportOptions {
pub orientation: PdfOrientation,
pub font: String,
pub font_size: f32,
pub include_frontmatter: bool,
pub include_notes: bool,
pub include_images: bool,
}Expand description
Options for pure-Rust PDF export.
Fields§
§orientation: PdfOrientationPage orientation (default portrait).
font: StringBase font name (default "Helvetica"). Pass a pdfrs Base-14 name or
the path to a TTF file.
font_size: f32Base font size in points (default 12.0).
include_frontmatter: boolWhether to include the YAML frontmatter in the rendered Markdown
(default true).
include_notes: boolWhether to include speaker notes (default true).
include_images: boolWhether to include image references (default true).
Implementations§
Source§impl PdfExportOptions
impl PdfExportOptions
Sourcepub fn with_orientation(self, orientation: PdfOrientation) -> Self
pub fn with_orientation(self, orientation: PdfOrientation) -> Self
Set page orientation.
Sourcepub fn with_font(self, font: impl Into<String>) -> Self
pub fn with_font(self, font: impl Into<String>) -> Self
Set base font name (Base-14 or TTF path).
Sourcepub fn with_font_size(self, size: f32) -> Self
pub fn with_font_size(self, size: f32) -> Self
Set base font size in points.
Sourcepub fn with_frontmatter(self, include: bool) -> Self
pub fn with_frontmatter(self, include: bool) -> Self
Toggle YAML frontmatter in the rendered Markdown.
Sourcepub fn with_notes(self, include: bool) -> Self
pub fn with_notes(self, include: bool) -> Self
Toggle speaker notes in the rendered Markdown.
Sourcepub fn with_images(self, include: bool) -> Self
pub fn with_images(self, include: bool) -> Self
Toggle image references in the rendered Markdown.
Trait Implementations§
Source§impl Clone for PdfExportOptions
impl Clone for PdfExportOptions
Source§fn clone(&self) -> PdfExportOptions
fn clone(&self) -> PdfExportOptions
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 moreSource§impl Debug for PdfExportOptions
impl Debug for PdfExportOptions
Auto Trait Implementations§
impl Freeze for PdfExportOptions
impl RefUnwindSafe for PdfExportOptions
impl Send for PdfExportOptions
impl Sync for PdfExportOptions
impl Unpin for PdfExportOptions
impl UnsafeUnpin for PdfExportOptions
impl UnwindSafe for PdfExportOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.