pub struct Presentation { /* private fields */ }Expand description
Represents a PowerPoint presentation
Implementations§
Source§impl Presentation
impl Presentation
Sourcepub fn with_title(title: &str) -> Self
pub fn with_title(title: &str) -> Self
Create a presentation with a title
Sourcepub fn add_slide(self, slide: SlideContent) -> Self
pub fn add_slide(self, slide: SlideContent) -> Self
Add a slide to the presentation
Sourcepub fn add_presentation(self, other: Presentation) -> Self
pub fn add_presentation(self, other: Presentation) -> Self
Append slides from another presentation
Sourcepub fn slide_count(&self) -> usize
pub fn slide_count(&self) -> usize
Get the number of slides
Sourcepub fn slides(&self) -> &[SlideContent]
pub fn slides(&self) -> &[SlideContent]
Get the slides in the presentation
Sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self>
Create a presentation from a PPTX file
Sourcepub fn save_as_html<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn save_as_html<P: AsRef<Path>>(&self, path: P) -> Result<()>
Export the presentation to HTML
Sourcepub fn save_as_pdf<P: AsRef<Path>>(&self, output_path: P) -> Result<()>
pub fn save_as_pdf<P: AsRef<Path>>(&self, output_path: P) -> Result<()>
Export the presentation to PDF using LibreOffice
Requires LibreOffice to be installed and available via soffice command.
On macOS, it also checks /Applications/LibreOffice.app/Contents/MacOS/soffice.
Trait Implementations§
Source§impl Clone for Presentation
impl Clone for Presentation
Source§fn clone(&self) -> Presentation
fn clone(&self) -> Presentation
Returns a duplicate of the value. Read more
1.0.0 · 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 Presentation
impl Debug for Presentation
Source§impl Default for Presentation
impl Default for Presentation
Source§fn default() -> Presentation
fn default() -> Presentation
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Presentation
impl RefUnwindSafe for Presentation
impl Send for Presentation
impl Sync for Presentation
impl Unpin for Presentation
impl UnwindSafe for Presentation
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().