Free Support Forum - aspose.com

Problems editing files after generating presentations with Aspose.Slides

Hi there

We’re having problems with editing files that have been generated by Aspose.Slides - the presentations are created by aggregating slides from other presentations, but after a user has downloaded the generated presentation, when they edit the file in PowerPoint some unusual behaviour occurs: After modifying a slide and saving the presentation, when the presentation is re-opened the slide has reverted to it’s original appearance, if the presentation is modified then saved under a new name with “Save As” the presentation will not open again in PowerPoint giving the message “PowerPoint can’t open [filename] because part of the file is missing”. Sometimes this happens without the “Save As” step and becomes corrupt after the normal save.

I suppose this isn’t strictly a problem with Aspose.Slides, but wondered if you could shed some light on why this may be happeneing.

Thanks

Which version of Aspose.Slides (.NET or JAVA), you are using and what is the version number? Such a problem "part of file is missing" occured earlier but fixed, so please use the latest version and let me know if problem still occurs. Also attach source presentations which after merging spawn this bug.

We’re using Aspose.Slides .NET 2.7.5.0.

Here’s a much reduced version of what we’re doing:

using System;
using System.Collections;
using System.Text;
using Aspose.Slides;

namespace AsposeTest
{
class Program
{
static void Main (string[] args)
{
License l = new License ();
l.SetLicense (“Aspose.Slides.lic”);

Presentation pptTargetPres = new Presentation ();
String[] sourcePresentations = new String[] { “1.ppt”, “2.ppt” };

foreach (String uriSourcePres in sourcePresentations)
{
Presentation pptSourcePres = new Presentation (uriSourcePres);
Slide slide = pptSourcePres.GetSlideByPosition (1);
int newSlidePos = pptTargetPres.Slides.Count + 1;
pptSourcePres.CloneSlide (slide, newSlidePos, pptTargetPres, new SortedList ());
}

pptTargetPres.Slides.Remove (pptTargetPres.GetSlideByPosition (1));
pptTargetPres.DeleteUnusedMasters ();
pptTargetPres.Write (“result.ppt”);
}
}
}

And please find attached two presentations that cause this error (so far it happens with any two presentations I’ve tried though - these two I made just for this test). We’re using Office 2003 if that makes a difference too.

Thanks

Try to delete handout before you write presentation.
Add this line after DeleteUnusedMasters call.

pptTargetPres.DeleteHandout();

I’ve just tried the handout deletion as suggested, but I’m afraid it still doesn’t work.

Dear emed,

We can reproduce this bug and will fix it as soon as possible.

Dear emed,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

This bug has been resolved.

Please download the latest version of Aspose.Slides 2.7.6.0 from this link.

http://www.aspose.com/Community/Files/51/aspose.slides/default.aspx

Thank you!