It works the right way, but it's very slow when it comes to big files.
I tried increasing memory allocated for java virtual machines, but without luck.
Any suggestion to speed up the process?
The code I am using is very simple, and it follows a given example. Here it is:
- Code: Select all
// Merges presentation
Presentation mgd = new Presentation();
mgd.getSlides().removeAt(0);
Presentation p1 = new Presentation("path/to/p1.pptx", FileFormat.PPTX_2013);
for (String[] sld : p1.getSlides()) {
mgd.getSlides().append(sld);
}
Presentation p2 = new Presentation("path/to/p2.pptx", FileFormat.PPTX_2013);
for (String[] sld : p2.getSlides()) {
mgd.getSlides().append(sld);
}
// Others files here...
Presentation pn = new Presentation("path/to/pn.pptx", FileFormat.PPTX_2013);
for (String[] sld : pn.getSlides()) {
mgd.getSlides().append(sld);
}
mgd.saveToFile("path/to/merged.pptx", FileFormat.PPTX_2013);
mgd.dispose();
Thank you!