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

Free Support Forum - aspose.com

ArgumentOutOfRangeException when saving a presentation

We have found that certain slides are unable to be saved by the Aspose library in .NET 3.5. These slides came from a client, so we have not been able to identify what it is about these slides that is causing the issue. The exception detail is as follows:

System.ArgumentOutOfRangeException was unhandled
Message=Value must be positive.
Parameter name: count
Source=mscorlib
ParamName=count
StackTrace:
at System.Text.StringBuilder.Append(String value, Int32 startIndex, Int32 count)
at . .Save( context, Stream stream, String dir)
at Aspose.Slides.Pptx.PresentationEx. ( context, outputType)
at Aspose.Slides.Pptx.PresentationEx.Write(Stream stream, type, PptxOptions options)
at Aspose.Slides.Pptx.PresentationEx.Save(Stream stream, SaveFormat format, SaveOptions options)
at Aspose.Slides.Pptx.PresentationEx.Save(String fname, SaveFormat format)
at BreakAsposeSlides.Program.Main() in c:\Projects\BreakAsposeSlides

I created a VS2013 solution that has the minimal code necessary to replicate this problem and I have attached it to this post. An example of a problematic presentation is included.

Notably, this problematic presentation was created by using Aspose.Slides to open a presentation with multiple slides and then saving a single slide to a new file, so it was created by an Aspose.Slides save function. If you open this file in PowerPoint and save it, the problem will be fixed since it is using PowerPoint’s save function instead of Aspose’s.

Campbell:

Notably, this problematic presentation was created by using Aspose.Slides to open a presentation with multiple slides and then saving a single slide to a new file, so it was created by an Aspose.Slides save function. If you open this file in PowerPoint and save it, the problem will be fixed since it is using PowerPoint's save function instead of Aspose's.


I updated the solution to more adequately display the process that's causing the problem. I am now starting with a file that was saved by PowerPoint, cloning a slide out of it into a new presentation and saving, then re-opening that presentation and saving again.

Hi,


I have worked with the presentation file shared by you using Aspose.Slides for .NET 8.2.0 and have been able to observe the issue specified. An issue with ID SLIDESNET-34907 has been created in our issue tracking system 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,

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


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

This issue seems to persist when using Aspose Slides version 8.3 even though it seems to mention here this issue was addressed.

This issue seems to be only with specific presentations that have been edited and saved with the Aspose Slides library, and it doesn’t happen to every presentation but a small subset. The reproducibility of this issue is difficult, but if you need proof of this issue, please use Aspose Slides 8.3 and attempt to save the presentation I have uploaded here using Aspose Slides.

Hi,

I have worked with your presentation files using latest Aspose.Slides for .NET 14.7.0 on my end. I have not been able to reproduce the issue on my end. I suggest you to please try using the specified version on your end. Aspose.Slides for .NET 8.x.x is no longer supported in Aspose.Slides and we have shifted to new unified Aspose.Slides for .NET 14.x.x series API.

Many Thanks,