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

Free Support Forum - aspose.com

Merging 2 huge pptx

I am trying accomplish following scenario:
Take 2 pptx files (lets say 500 slides each) and merge them. My code looks like:

Presentation pres1 = new Presentation(getPptx());
Presentation pres2 = new Presentation(getOtherPptx();

for(ISlide slide : pres2 .getSlides()){
pres1 .getSlides().addClone(slide);

pres1.save(“target/” + “merged.pptx”, SaveFormat.Pptx);

But it takes ages and consumes a lot of memory! Is there more clever way to do this? For example using streams directly, etc ?

Hi Paweł,

Thanks for your interest in Aspose.Slides.

I have observed the requirement shared by you and like to share that when you will merge two huge presentations, every thing is loaded in Document Object Model (DOM) of Aspose.Slides. The more the slides and content inside the presentation the more space will be needed in memory to load that. I hope this will clarify the concept. Please share, if I may help you further in this regard.

Many Thanks,