Hi Iam reading the multiple PPTs, which each PPT has single slide and iam trying to copy all these slides into new Presentation.
here is my code:
File dir = new File("D://output");
String[] children = dir.list();
if (children == null) {
System.out.println(" **** Directory is Empty ****");
} else {
for (int i=0; i<children.length; i++) {
String filename = children[i];
if(!filename.endsWith(".ppt")){
break;
}
Presentation srcPres = new Presentation(new FileInputStream( dir + "/" + filename ));
Point size = new Point(3,3);
Presentation newPres = new Presentation();
newPres.setSlideSize(size);
TreeMap ids = new TreeMap();
for (int iSlidesCounter = 0; iSlidesCounter < children.length; iSlidesCounter++) {
ids.clear();
newPres.cloneSlide(newPres.getSlides().get(0), srcPres.getSlides().getLastSlidePosition()+1, srcPres, ids);
srcPres.write(new FileOutputStream("d://output/newslide.ppt"));
With the above code iam not able to copy the slides into new Presentation.
Could any one please help me, where iam doing wrong.
Thanks,
Mohan