Free Support Forum - aspose.com

File save issue

Hello,

I’m evaluating Aspose.PowerPoint and am having trouble saving a copy of a template file. If open a template file and then save it the new file doesn’t match the template file (table formatting, size, position are different).

I’m using version 2.2.5.0 of Aspose.PowerPoint.

The code I use follows and I’ve attached the template file and a generated output file.

if (args.Length != 2)
{
Console.WriteLine(“Usage: PowerPointTest [input file name] [output file name]”);
}

else
{
FileStream fis = new FileStream(args[0], FileMode.Open, FileAccess.Read);
Presentation pres = new Presentation(fis);
fis.Close();

//Write PowerPoint to file
FileStream fout = new FileStream(args[1], FileMode.Create, FileAccess.Write);
pres.Write(fout);
fout.Flush();
fout.Close();
}

Please let me know if I’m doing something wrong or if this is an issue.

Regards,
Mike

Hello,

Any idea why this happens?

I am also able to generate corrupt PowerPoint files without exceptions being thrown. I’ll provide more details on this after my first question is answered.


Regards,
Mike

Dear Mike,



The first your problem is because of bug. We are preparing new hot fix for that.

Hello,

I tried the latest version 2.2.6 and it fixed the first issue (Table formatting).

My second issue relates to corrupt output files. I created a test program where I clone a slide from a template file multiple times inserting data and a different image each time.

When I loop 1,3, or 4 times I get a good output file.
When I loop 2 or 5 times I get a bad output file.

I’ve attached a zip file containing the template file, one good output file, and one bad output file. Hopefully you can examine the generated files and see why PowerPoint dies when trying to open the bad file.


Regards,
Mike