Presentation.SaveDocument(Stream, DocumentFormat) Method
Saves the presentation in the specified format to the given stream.
Namespace: DevExpress.Docs.Presentation
Assembly: DevExpress.Docs.Presentation.v25.2.dll
NuGet Package: DevExpress.Docs.Presentation
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| stream | Stream | A stream to which the presentation should be saved. |
| documentFormat | DocumentFormat | The format in which the presentation should be saved. |
Remarks
The following code snippet saves a presentation in the POTX format:
using DevExpress.Docs.Presentation;
using System.Drawing;
namespace PresentationApiSample;
public class Program {
public static void Main(string[] _) {
Presentation presentation = new Presentation(File.ReadAllBytes(@"..\..\..\data\Presentation2.pptx"));
//...
FileStream outputStream = new FileStream(@"D:\\presentation.potx", FileMode.Create);
presentation.SaveDocument(outputStream, DocumentFormat.Potx);
outputStream.Dispose();
}
}
See Also