Aspose.slides.PPtUnsupported Exception

Dear Team,

I was trying to convert a simple PPT document to PDF and I am getting the following error.

I am using the Memorystream as input to new presentation and getting the error at following location

Aspose.Slides.

Presentation pres = new Aspose.Slides.Presentation(memStr);

The same document when converted using dashboard Examples is working fine.

Note: MemoryStream implementation I was able to execute successfully in both Word and excel.

appritiate your quick help.

Thanks,

Pavan.

Hi Pavan,


I have observed the issue image shared by you and request you to please share the sample presentation causing the issue on your end. Please also try using Aspose.Slides for .NET 15.2.0 on your end first as well.

Many Thanks,

Dear Mudassir,

I am using a normal PPT which i created just now with test data. I am attaching the same for your review.

Also I am using the latest Aspose.slides 15.2.0 (tried 4.0 and 3.3 also) which came along Aspose.Total. I downloaded the MSI and installed today itself.

Please do the needful.

Thanks,

Pavan.

Hi Pavan,

I have worked with the presentation file shared by you and there is no issue in loading the presentation. The issue is that you are loading the presentation in stream and have not set the stream position to 0. Please try using the following sample code on your end before loading the Presentation object.

memStr.Position=0;


Many Thanks,

Dear Mudassir,


This is brilliant. This worked perfectly.

I do have a question for you.

I did not write this piece of code while working with Word and Excel. they worked good. What do you suggest, Whether I have to write this piece of code for Word and Excel?

This one is out of the blue, I have converted PPT to PDF and added a Page in new PDF, Since PPT slides are landscape, The newly added page (Portrait) looks awkward to existing pages. Is there any way to create/ add a Landscape page as first page to PDFs?

Attached are sample ppt and pdf .

Please suggest.

Thanks,
Pavan.

Hi Pavan,


I have observed your requirements and like to share that you can set orientation of slides in presentation. However, you can orientation on presentation level that is set for all slides. Its not like that some of slides in presentation have Landscape orientation while others have Portrait. The same principle is applied in PowerPoint as well. In order to achieve your requirement, I suggest you to please try using two different presentations with different slide orientation. Then you generate the PDF for them. Later on you may use any third party or even Aspose.Pdf to merge the presentation files with different orientation. I hope this will be helpful. Please share, if I may help you further in this regard.

Many Thanks,