PresentationEx from a Stream

Hello,

I am trying to create a PresentationEx from a Stream in .NET (in VB.NET) by doing the following:

Dim asposePPTPresentation As Aspose.Slides.Pptx.PresentationEx = New Aspose.Slides.Pptx.PresentationEx(myReader)

Where myReader is of type Stream. However, I keep getting an UnhandledFileException. A similar approach works fine for the other components that I have (Aspose.PDF with Aspose.Pdf.Document, Aspose.Cells with Aspose.Cells.Workbook). I am using the latest version of Aspose.Cells (6.8) that I downloaded yesterday.

Hi,


Thanks for your interest in Aspose.Slides.

I have observed the sample code line shared by you and it seems fine to me. Please share the complete sample code for loading presentation in stream and then using that stream in PresentationEx. I also like to add that you need to set the position of stream to 0 before loading the presentation using PresentationEx. The following statement will help and if there is still an issue then please share the complete sample code along with presentation used. I will investigate that further on my end to help you out.

myReader.Postion=0

Many Thanks,

Ah, that’s right, I accidentally commented out the line which rewinds the stream. Works fine now, Thank you.