Created
November 13, 2024 13:37
-
-
Save conholdate-gists/18ef4df9de62b5428ec952aaf8a39d5c to your computer and use it in GitHub Desktop.
Merge PowerPoint Presentation in Java | Combine Slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.aspose.slides.Presentation pres1 = new com.aspose.slides.Presentation("pres1.pptx"); | |
try { | |
com.aspose.slides.Presentation pres2 = new com.aspose.slides.Presentation("pres2.pptx"); | |
try { | |
for(com.aspose.slides.ISlide slide : pres2.getSlides()) | |
{ | |
pres1.getSlides().addClone(slide); | |
} | |
} finally { | |
if (pres2 != null) pres2.dispose(); | |
} | |
pres1.save("combined.pptx", com.aspose.slides.SaveFormat.Pptx); | |
} finally { | |
if (pres1 != null) pres1.dispose(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.aspose.slides.Presentation pres1 = new com.aspose.slides.Presentation("pres1.pptx"); | |
try { | |
com.aspose.slides.Presentation pres2 = new com.aspose.slides.Presentation("pres2.pptx"); | |
try { | |
for(com.aspose.slides.ISlide slide : pres2.getSlides()) | |
{ | |
pres1.getSlides().addClone(slide, pres2.getMasters().get_Item(0), true); | |
} | |
} finally { | |
if (pres2 != null) pres2.dispose(); | |
} | |
pres1.save("combined.pptx", com.aspose.slides.SaveFormat.Pptx); | |
} finally { | |
if (pres1 != null) pres1.dispose(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.aspose.slides.Presentation pres1 = new com.aspose.slides.Presentation("pres1.pptx"); | |
try { | |
com.aspose.slides.Presentation pres2 = new com.aspose.slides.Presentation("pres2.pptx"); | |
try { | |
for(com.aspose.slides.ISlide slide : pres2.getSlides()) | |
{ | |
pres1.getSlides().addClone(slide, pres2.getLayoutSlides().get_Item(0)); | |
} | |
} finally { | |
if (pres2 != null) pres2.dispose(); | |
} | |
pres1.save("combined.pptx", com.aspose.slides.SaveFormat.Pptx); | |
} finally { | |
if (pres1 != null) pres1.dispose(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment