Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Fri Nov 01, 2024 1:01 pm

Problem:
Cloning this slide causes the pptx to become corrupt.

The slide is very simple with 1 chart only.

Not sure whats the issue.

Corrupt PPTX.zip

boosted_d16
 
Posts: 34
Joined: Wed Apr 19, 2023 11:41 am

Mon Nov 04, 2024 8:22 am

Hi,

Thank you for your message.
I have tested the file you provided using the latest version 9.10.2, but I was unable to reproduce the issue you mentioned. My code is as follows. Please download the new version from the link below for testing. If the problem persists, please provide your test code for us to further investigate. Thanks in advance!

Nuget Download: https://www.nuget.org/packages/Spire.Pr ... ETStandard

Code: Select all
void Test_43200()
{
    Presentation ppt = new Presentation();
    ppt.LoadFromFile(@"D:\attachments\11-04\Corrupt PPTX\Corrupt PPTX.pptx");

    //Load the another document and choose the first slide to be cloned
    Presentation ppt1 = new Presentation();
    ISlide slide1 = ppt.Slides[0];

    //Insert the slide to the specified index in the source presentation
    int index = 1;
    ppt1.Slides.Insert(index, slide1);

    //Save the document
    ppt1.SaveToFile("Output_43200.pptx", FileFormat.Pptx2010);

}
User avatar

Doris.Liu
 
Posts: 406
Joined: Mon Nov 07, 2022 8:10 am

Return to Spire.Presentation