Saving PowerPoint Presentation Using Aspose.Slides for .NET Gives Corrupted File

Hi

Saving that powerpoint file with a few videos gives corrupted file.

Can you help please ?

Thank you

@pcaillol,
Thank you for contacting support.

I was unable to reproduce the problem you described. Please check your results carefully again. If the issue persists, please share the following:

  • code example that reproduces the problem
  • output file
  • OS version on which the code was executed
  • .NET target platform in your app
  • Aspose.Slides version you used

code:

var ppt_out_no_ext = Path.Combine(ppt_out_dir, Path.GetFileNameWithoutExtension(ppt_path));
Aspose.Slides.Export.SaveFormat ppt_file_aspose_format = GetPresFormat(ppt_path);
var ppt_out = ppt_out_no_ext + "." + ppt_file_aspose_format.ToString().ToLower();

Aspose.Slides.LoadOptions _loadOptions = new Aspose.Slides.LoadOptions()
{
    BlobManagementOptions = new BlobManagementOptions
    {
        PresentationLockingBehavior = PresentationLockingBehavior.KeepLocked,
        IsTemporaryFilesAllowed = true,
        MaxBlobsBytesInMemory = 100 * 1024 * 1024,
        //TempFilesRootPath = @"D:\Work\BUGS PPT\_temp"
    }
};
using (var stream = new FileStream(ppt_path, FileMode.Open))
{
    Aspose.Slides.Presentation pres = null;
    try
    {
        pres = new Aspose.Slides.Presentation(stream, _loadOptions);
        pres.Save(ppt_out, Aspose.Slides.Export.SaveFormat.Pptx);
        WriteLog("ok", LogType.info);
    }
    catch (Exception ex)
    {
        WriteLog(ex.Message, LogType.error);
    }
}

win10 .net 4.7 aspose.slides 23.2.0

output file:

thank you

@pcaillol,
Thank you for the additional information. I am working on the issue and will get back to you as soon as possible.

@pcaillol,
I reproduced the problem with saving the PowerPoint presentation file.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-43862

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

hi
What were you previous conditions to have it working properly compared to mine please ?
thanks.

@pcaillol,
I used the following code lines:

var presentation = new Presentation("_save_corrupted_2.pptx");
presentation.Save("output.pptx", SaveFormat.Pptx);

It works fine.

Here is another PPT that gets corrupted after saving:

before:
https://www.dropbox.com/scl/fi/dhctnejlrvbc0wvfu5jnh/_saves_corrupted_1.pptx?dl=0&rlkey=l6yr54xq6gq1iav0eig5errb8

after:
https://www.dropbox.com/scl/fi/2oiiehsc096h0aebel0qp/_saves_corrupted_after_1.pptx?dl=0&rlkey=c950mon9qh2fhstttkrpmoz4d

Do you reproduce ?

Thank you

Another PPT, before:

Another before:
https://www.dropbox.com/scl/fi/0cx1fhcrg8b54ob7v8ch0/_saves_corrupted_4.pptx?dl=0&rlkey=b8faesv1uftmzxn7fio03ootr

@pcaillol,
I reproduced the same issue with the _saves_corrupted_1.pptx. These files are very large. I think we have enough samples. Thank you for the files.

And last before:
https://www.dropbox.com/scl/fi/uzn4x0bbc2ijma1za1us9/_saves_corrupted_5.pptx?dl=0&rlkey=pq0wngmkirctq94nagjeut2x6

The problem occurs independantly from size i think, specific video are in cause.

Thank you.

@pcaillol,
Thank you for the note. I forwarded it to our developers.

The issues you found earlier (filed as SLIDESNET-43862) have been fixed in Aspose.Slides for .NET 23.4 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.