XMLSlideShow ppt = new XMLSlideShow();
// Creating an empty presentation
if (!powerpoints.isEmpty()) {
for (String arg : powerpoints) {
FileInputStream inputstream = new FileInputStream(arg);
XMLSlideShow src = new XMLSlideShow(inputstream);
ppt.setPageSize(src.getPageSize());
for (XSLFSlide srcSlide : src.getSlides()) {
ppt.createSlide().importContent(srcSlide);
}
src.close();
inputstream.close();
}
String mergedFile = intropath + "PowerPoints/result1.pptx";
FileOutputStream out = new FileOutputStream(mergedFile);
ppt.write(out);
ppt.close();
out.close();
I am attempting to merge powerpoints with this code. it merges all the powerpoints for the most part. Some spacing is off though and every time i open the result powerpoint it says it “needs to be repaired” Any way to fix both of these issues or alternate ways. I used to use Aspose Slides cloud but it has been giving me issues lately.
I am attempting to merge powerpoints with this code. it merges all the powerpoints for the most part. Some spacing is off though and every time i open the result powerpoint it says it “needs to be repaired” Any way to fix both of these issues or alternate ways. I used to use Aspose Slides cloud but it has been giving me issues lately.
Mina Hanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.