Skip to content

This content is for v4.x version. Switch to the Stable version.

PowerPoint

The PowerPoint class/struct is the entry point for creating and opening PowerPoint (.pptx) presentations. In the current alpha the presentation engine supports creating a new blank presentation, opening an existing presentation and saving it back out. Slide-level authoring is in active development.

RustC#Function
PowerPoint::new(path, props)new PowerPoint(props) / new PowerPoint(path, props)Create a new presentation or open an existing file
save_as(path)SaveAs(path)Save the presentation to a file
use draviavemal_openxml_office::presentation_2007::{PowerPoint, PowerPointPropertiesModel};
// Create a new blank presentation (pass Some(path) to open an existing file)
let file = PowerPoint::new(None, PowerPointPropertiesModel::default())
.expect("Create New File Failed");
file.save_as("./output.pptx").expect("Failed to save presentation");
C#TypeDetails
IsInMemoryboolKeep the presentation buffered in memory instead of on disk
  • Slide add / get / move / remove operations
  • Shapes, tables, charts, pictures and text boxes
  • Multi Slide Master Support
  • Each Slide Master Theme Support