We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error in opening the PPTX File generated via Aspose Slides .NET

Hi,

I tried to generate a PPTX using Aspose Slides 5.9. The PPTX (Attached as AsposeTest4 was well formed. I tried to open the PPTX file in MS Powerpoint 2003. But I got an error as "There was an error in accessing file". But the same file when opened in MS Powerpoint 2010, it opened correctly without errors.

Further I changed the Height of the table alone from the table formation code as int tableHeight = 596; I got the PPTX (OutputFileName: AsposeTest3) that opened well without errors in both Powerpoint 2003 and 2010. Also I could see that the height of the table appeared to be same as that of the table height 196 used in the earlier case

Can you look in this with high priority asap?

Please find the code snippet.

Aspose.Slides.License license = new Aspose.Slides.License();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

license.SetLicense("Aspose[1].Slides.lic");

PresentationEx newPptx = new PresentationEx();

SlideEx newSlide = newPptx.Slides[0];

int tableWidth = 637;

int tableHeight = 196; //Opens in both 2010 only. Shows error in 2003

//int tableHeight = 596; //Opens file in both 2003, 2010

double[] columnWidths = new double[8];

for (int i = 0; i < columnWidths.Length; i++)

{

columnWidths[i] = (double)(tableWidth / 8) / 8;

}

double[] rowHeights = new double[7];

for (int i = 0; i < rowHeights.Length; i++)

{

rowHeights[i] = (double)(tableHeight / 7) / 8;

}

int tableIndex = newSlide.Shapes.AddTable(20,30,columnWidths,rowHeights);

TableEx table = (TableEx)newSlide.Shapes[tableIndex];

this.Response.ContentType = "application/pptx";

this.Response.AppendHeader("Content-Disposition", "attachment; filename =PPT with Response.pptx");

this.Response.Flush();

Stream st = this.Response.OutputStream;

newPptx.Write(st);

this.Response.End();

Let me know if you require any other information.

Thanks.

Hi Htanmo,

I have worked with code snippet shared by you and have performed the mentioned scenarios. I have been able to reproduce the issue in Aspose.Slides for .NET 6.6.0. It seems to be an issue with Aspose.Slides for .NET and an issue with ID SLIDESNET-33736 has been created to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

Hi Mudassir,

Is there any work around to fix the issue in Aspose 5.9 as the project will not be upgraded to any higher versions. We changed our Aspose to 5.9 from 4.0 only few months back. Please advise. A quick reply would be very useful.

Thanks.

Also we have a code movement to Production in some days.

Hi Htanmo,


Unfortunately, I am unable to share any work around with you for the shared issue at the moment. I may request you to please wait till our development team schedule issue for investigation and resolution.

We are sorry for your inconvenience,

Thanks Mudassir. For your information, I took more time and found that the cause of the error to open in Powerpoint 2003 was with the table height dimension. :(. Also the height when set beyond 575 gives no errors.

As you said there is no work around I could feel that changing the table height to 596 (Eventhough the actual table height would be that set to 196 in an Ideal case) and making other dimension changes as required would be fine. Let me try that.

Please update me once you get the information from your development team.

Thanks.

Hi Htanmo,


I will for sure update you as soon as updates will be available from our development team.

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-33736) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.