Free Support Forum - aspose.com

Default Constructor

When I try to do…


PresentationEx newPresentation = new PresentationEx();

I get…


Test method TestFramework.UnitTest1.TestGeneratingPptxDeck threw exception: Aspose.Slides.PptReadException: Error reading “/ppt/theme/theme1.xml” xml part —> System.Xml.Schema.XmlSchemaException: The ‘http://schemas.openxmlformats.org/markup-compatibility/2006:Ignorable’ attribute is not declared…

Any thoughts?

Hi,

It will not work. You can create an empty pptx and pass it as argument.

I was attempting to do that as well with…


FileStream fis = new FileStream(@“c:\data\testoutput.pptx”, FileMode.Create, FileAccess.ReadWrite);
PresentationEx newPresentation = new PresentationEx(fis);

but that too threw the exception:

Test method TestFramework.UnitTest1.TestGeneratingPptxDeck threw exception: ix: central directory not found, probably not a zip file.

This is really just a work-around to my other thread about invalid PPTX file being created. Is there something I am done wrong with that one?

Hello Nick,

First exception means that xml file inside pptx presentation used as template doesn’t follow OpenXML scheme. We will investigate it.

The second exception probably because testoutput.pptx file is not a pptx presentation or may be broken.

Here is the problem that I am actually trying to solve…


I am trying to automate the creation of a pptx file from a potx file. I cant seem to do this the same way I would with ppt and pot files. Any help you can provide would be great. I have tried using…

new PresentationEx(TemplateFile);
and
new PresentationEx();

Neither seems to work. If you take a look at the other couple threads I started today I have provided some additional sample code.

Thanks

Nick

We will prepare the fix on weekends. So default constructor will work after that.

Hello Nick,

Please try attached new version of Aspose.Slides for .NET. Default PresentationEx() constructor should work now.

Alex


This works now, but I am still having the root problem. When I create a file I get the following error message:

“Powerpoint cannot open the file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file”.

This is a .pptx file generated by opening 3 other pptx files and cloning their slides into 1 master file.

Any thoughts?

Thanks

Nick

Hi Nick,

It would be great if you provide the source pptx and the source code you are using for investigation.