Presentation(Byte[]) Constructor
Initializes a new instance of the Presentation class with specified settings.
Namespace: DevExpress.Docs.Presentation
Assembly: DevExpress.Docs.Presentation.v25.1.dll
NuGet Package: DevExpress.Docs.Presentation
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| buffer | Byte[] | A presentation (PPTX) as a byte array. |
Remarks
The following code snippet loads a presentation (PPTX file) from a byte array:
using DevExpress.Docs.Presentation;
namespace PresentationApiSample;
public class Program {
public static void Main(string[] _) {
// Load a presentation from a byte array
Presentation presentation = new Presentation(File.ReadAllBytes(@"D:\mypresentation.pptx"));
}
}
Note: If you try to load a corrupted PPTX file or file in another format, you get a PresentationUnsupportedFormatException.
For more information, refer to the following help topic: DevExpress Presentation API Library: Create, Load, and Save Presentations.
See Also