Aspose PPTs saved by PowerPoint no longer readible

We have a problem that is resulting in PPTs that have been saved via the Aspose library to become unreadible once openned in PowerPoint and then subsequently saved via PowerPoint. Here are the details:

In the attached zip file there are 2 presentations (Pres1 and Pres2).

Pres1 was created by:
reading a PowerPoint file
cloning first slide to a new presentation
removing blank slide and master
saving new presentation back out to file

Pres2 was created by:
opening Pres1 in PowerPoint (2003)
changing text or anything else
saving presentation back out

When I try to read Pres2 back in it will throw an error saying "Cannot read PowerPoint document record"
It is also interesting that trying to open Pres2 in PowerPoint will also throw an error saying that part of the file is missing

Pres2 is clearly messed up but, what is wrong with Pres1 that remains hidden until PowerPoint tries to save the file?


Please attach the presentation from which you cloned slide into your new presentation.

Here is the source Presentation

I will also work on providing example code for how we are working with these presentations. As there are more steps than listed above, it will take some time to sort out.

Dear Plunk,

I have attached two presentations generated by the code below using Aspose.Slides 2.6.26.0. One was generated after setting license and the other was generated without license.

If you open them and save them with or without editing, it opens fine next time in MS-PowerPoint 2002

Presentation srcPres = new Presentation(@"d:\downloads\CPGWebsiteAudiences.ppt");
Presentation dstPres = new Presentation();

Slide dstSld = dstPres.GetSlideByPosition(1);
srcPres.CloneSlide(srcPres.GetSlideByPosition(1), 1, dstPres, new SortedList());
dstPres.Slides.Remove(dstSld);
dstPres.Write("c:\\outDst.ppt");

Please open them and edit them and resave using MS-PowerPoint 2003 and see this problem re-occurs.

ok I think I found where I am having trouble,

In your example there is still a blank master left in the presentation.

If you read presentation back and call DeleteUnusedMasters()
or call DeleteUnusedMasters before writing out the first time

The presentation will open in powerpoint 2003 ok but when I save it again the presentation is corrupt - powerpoint will not open it again and aspose cannot read it again.


Yes, I can now see this problem and will report it for a fix.

Just to be sure. With the 2.7.2 hotfix all I need to do is call DeleteHandout before or after DeleteUnusedMasters to fix this problem

Use it before calling Presentation.Write method.

Ok, thanks for the info and thanks for the work you all put into this.

JP