Free Support Forum - aspose.com

Pptx support

Hello!

Does Aspose.Slides support pptx presentations? I have error. "Aspose.Slides.UnsupportedFormatException : The file is ZIP archive. It can be Microsoft PowerPoint 2007 PPTX presentation."

But your site says: " Using Aspose.Slides for .NET, developers can easily open and save a large number of file formats. These include PowerPoint presentation, template and slideshow formats from 97 – 2003 and 2007 "


Thanks,

Vladimir

Hi Vladimir,


Thanks for inquiring Aspose.Slides.

I like to share that Aspose.Slides does support PPTX presentations and for that there is separate namespace in Aspose.Slides package. Please import namespace Aspose.Slides.Pptx and follow the examples shared over this documentation link for your convenience. Please share, if I may help you further in this regard.

Many Thanks,

Hi Mudassir,

Thanks for your quick response! Unfortunately I have this error while try to open .PPT document. When I tried to create PresentationEx object I see "Aspose.Slides.UnsupportedFormatException : Unknown file format."

Code example:


internal static string ConvertToPdf(Stream pStream, string outFilename, string folderName)
{
try
{
Presentation presentation = new Presentation(pStream);
presentation.Save(Path.Combine(folderName, outFilename), SaveFormat.Pdf);
}
catch (UnsupportedFormatException)
{
PresentationEx presentationEx = new PresentationEx(pStream);
presentationEx.Save(Path.Combine(folderName, outFilename), SaveFormat.Pdf);
}}

Hi Vladimir,


I have tried to open the presentation file shared by you using Aspose.Slides and it gives error. Actually, the presentation shared is it self corrupted. It is neither getting opened in PowerPoint 2010 nor in PowerPoint 2010. Additionally, I have tried to extract the presentation using WinRar and it also gave the error. I feel you need to observe the presentation on your end as it is corrupted.

Many Thanks,

Thanks Mudassir!

I resaved document in the Powerpoint 2010 and open this using Aspose.Slides!


Best regards,

Vladimir

Hi Vladimir,


You are always welcome. Please share, if I may help you any further in this regard.

Many Thanks,