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

Free Support Forum - aspose.com

Error in clone-function with wider slides

Hello Support,

we use your copy-slide function to copy slides from one or several pptx-files to make a new presentation.

Therefore we need a exact copy of the slide. But if we copy slides from the pptx (as attached: width slides original) the result are slides with error (please see the output pptx).

How we can solve this??



Hi Ingo,

Thanks for inquiring Aspose.Slides.

I have observed the requirements shared by you and like to share that you need to set the target pretension slide size to that of source presentation. The default, slide size is 720 x 540. This is the reason why the cloned slides are not properly copied. Please try using the attached sample code on your end and share with us if there is any issue incurring.

String path= @“D:\Aspose Data”;

Presentation peSource = new Presentation(path+“TestFlash1.pptx”);
Presentation peTarget = new Presentation();

peTarget.SlideSize.Size = peSource.SlideSize.Size;
foreach (ISlide slide in peSource.Slides)


peTarget.Save(path+“NewPresentation.pptx”, Aspose.Slides.Export.SaveFormat.Pptx);

Many Thanks,

thank you.

It’s all fine now.