officefileapi-devexpress-dot-docs-dot-presentation-dot-presentation-dot-savedocument-x28-system-dot-io-dot-stream-x29.md
Saves the presentation to a stream.
Namespace : DevExpress.Docs.Presentation
Assembly : DevExpress.Docs.Presentation.v25.2.dll
NuGet Package : DevExpress.Docs.Presentation
public void SaveDocument(
Stream stream
)
Public Sub SaveDocument(
stream As Stream
)
| Name | Type | Description |
|---|---|---|
| stream | Stream |
A stream to which the presentation should be saved.
|
The following code snippet saves the created presentation as a PPTX file:
using DevExpress.Docs.Presentation;
namespace PresentationApiSample;
public class Program {
public static void Main(string[] _) {
// Create a presentation
Presentation presentation = new Presentation();
//...
// Populate the presentation with content
//...
// Save the modified presentation to a new PPTX file
FileStream outputStream = new FileStream(@"D:\\resulting-presentation.pptx", FileMode.Create);
presentation.SaveDocument(outputStream);
outputStream.Dispose();
}
}
Imports DevExpress.Docs.Presentation
Namespace PresentationApiSample
Public Class Program
Public Shared Sub Main(__ As String())
' Create a presentation
Dim presentation As Presentation = New Presentation()
'...
' Populate the presentation with content
'...
' Save the modified presentation to a new PPTX file
Dim outputStream As FileStream = New FileStream("D:\\resulting-presentation.pptx", FileMode.Create)
presentation.SaveDocument(outputStream)
outputStream.Dispose()
End Sub
End Class
End Namespace
See Also
DevExpress Presentation API Library: Create, Load, and Save Presentations