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.
Methods
Section titled βMethodsβ| Rust | C# | 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 |
Basic Code Samples
Section titled βBasic Code Samplesβ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");using draviavemal.openxml_office.presentation_2007;
// Create a new blank presentationPowerPoint powerPoint = new(new(){IsInMemory = false});powerPoint.SaveAs("./output.pptx");
// Open an existing presentationPowerPoint existing = new("basic_test.pptx", new(){IsInMemory = false});existing.SaveAs("./edited.pptx");Not yet available.
Not yet available.
Not yet available.
Not yet available.
PresentationProperties Options
Section titled βPresentationProperties Optionsβ| C# | Type | Details |
|---|---|---|
IsInMemory | bool | Keep 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