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.

Thu Nov 14, 2024 11:19 am

Hello,
I am trying to clone a slide out of this presentation but I fail even with simple code like the following

Code: Select all
            Presentation ppt = new Presentation();
            ppt.LoadFromFile(@"test.pptx");
            var finalPpt = new Presentation();
            finalPpt.Slides.RemoveAt(0);
            finalPpt.SlideSize.Type = ppt.SlideSize.Type;
            var generatedSlide = ppt.Slides[0];

            finalPpt.Slides.Append(generatedSlide);

            finalPpt.SaveToFile(@"C:\temp\out.pptx", FileFormat.Pptx2013);


It seems like there's something odd in the input template that the library doesn't handle but I can't figure out what it is.
I am attaching the template presentation here.

Thanks a lot,
Andrea

andreacalvi
 
Posts: 23
Joined: Tue Jul 11, 2023 11:02 am

Fri Nov 15, 2024 3:32 am

Hi,

Thank you for the message.
It seems you forgot to attach the test file. Could you please provide it? Thank you very much!

Sincerely,
Doris
E-iceblue support team
User avatar

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

Fri Nov 15, 2024 10:51 am

here you go.
pga-509-corrupt-4.4.zip

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

Mon Nov 18, 2024 3:34 am

Hi,

Thank you for your sharing.
I tested your issue with our latest Spire.Presentation version 9.11.3, but did not encounter any file corruption. I have attached my output file for your reference. I recommend that you test it again using the latest version.

9.11.3:https://www.e-iceblue.com/Download/download-presentation-for-net-now.html

Sincerely,
Doris
E-iceblue support team
User avatar

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

Return to Spire.Presentation