I need to paste 3 pictures in single slide using Apache POI XSLF. However I could able to add only one picture in a slide. Also I could not find any ways to specify the size and
You nead to set Anchor to your pictures
for (int i = 1; i <= 2; i++) {
byte[] pictureData = IOUtils.toByteArray(new FileInputStream(
"C:\\Users\\Ashok\\Pictures\\" + i + ".png"));
int elementIndex = ppt.addPicture(pictureData,
XSLFPictureData.PICTURE_TYPE_PNG);
XSLFPictureShape picture = slide.createPicture(elementIndex);
// Set picture position and size
picture.setAnchor(new Rectangle(positionX, positionY, width, height));
List<XSLFPictureData> allPictures = ppt.getAllPictures();
System.out.println(allPictures.size());
}