
Untitled
By: a guest on
Jul 11th, 2012 | syntax:
None | size: 1.35 KB | hits: 16 | expires: Never
private static void testSlideBG() throws IOException {
File pptFile = new File("/home/rdpatel/data/user/urvish/testAll.ppt");
Presentation pres = new Presentation(new FileInputStream(pptFile));
FileOutputStream fos;
for (int i = 0; i < pres.getSlides().size(); i++) {
// Shapes shapes =pres.getSlides().get(i).getShapes();
// for(int j=0;j<shapes.size(); j++){
fos = new FileOutputStream("/home/rdpatel/Desktop/Slide_" + i + ".png");
try {
// fos.write(pres.getPictures().getPictureById(pres.getSlides().get(i).getBackground().getShapeId()).getImage());
System.out.println("Master shapeID:" + pres.getSlides().get(i).getBackground().getMasterShapeId());
System.out.println("shapeID:" + pres.getSlides().get(i).getBackground().getFillFormat());
System.out.println("isFollowMasterBG:" + pres.getSlides().get(i).isFollowMasterBackground());
//fos.write(pres.getPictures().getPictureById(pres.getSlides().get(i).getSlidePosition()).getImage());
} finally {
fos.close();
}
// }
}
System.out.println("--------------------------");
for (int i = 0; i < pres.getPictures().size(); i++) {
Picture picture = pres.getPictures().get(i);
System.out.println("Pic ID: " + pres.getPictures().get(i).getPictureId());
}
}
public static void main(String[] args) throws IOException {
testSlideBG();
}