Skip to main content
All docs
V25.2
  • 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

    public void SaveDocument(
        Stream stream,
        DocumentFormat documentFormat
    )

    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();
        }
    }
    

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveDocument(Stream, DocumentFormat) method.

    Note

    The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

    See Also