We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

With .net aspose.slides how can I initiatize a presentation from a byte array?

I am reading in a powerpoint presentation into a byte array and i want to initialize a aspose.slides presentation from that byte array.


Is this possible without having to save it down as a file?

Hi Adam,


Thank you for posting.

I have observed your comments and like to share with you that, you can initialize a presentation object from a byte array. Please try using following code on your end and then share your kind feedback with us.

var stream = File.OpenRead(“D:\test.pptx”);<o:p></o:p>

var fileBytes = new byte[stream.Length];

MemoryStream memoryStream = new MemoryStream(fileBytes);

memoryStream.Position = 0;

stream.Read(fileBytes, 0, fileBytes.Length);

var pres = new Aspose.Slides.Presentation(memoryStream);


Please let us know if the issue persists. We will be glad to help you further.

Best Regards,