Hii,
Can any one help me how to add image and some text to Header and footer for a slide.
Thanks in advance,
Gangadhar.
Hi Gangadhar,
Presentation pres=new Presentation(“D:/Aspose Data/Footer1.ppt”);Slide slide=pres.getSlideByPosition(1);Shape shape;for(int i=0;i<slide.getShapes().size(); i++){shape=slide.getShapes().get(i);if(shape.getAlternativeText().equals(“Footer”)){shape.getFillFormat().setType(FillType.PICTURE);//Creating a stream to hold the image fileInputStream iStream = new BufferedInputStream(new FileInputStream(“C:/Users/Public/Pictures/Sample Pictures/Tulips.jpg”));//Creating a picture object that will be used to fill the ellipsePicture pic = new com.aspose.slides.Picture(pres, iStream);//Adding the picture object to pictures collection of the presentation//After the picture object is added, the picture is given a uniqe picture Idint picId = pres.getPictures().add(pic);//Setting the picture Id of the shape fill to the Id of the picture objectshape.getFillFormat().setPictureId(picId);TextFrame tf=shape.getTextFrame();tf.setText(“This is new Text”);}}pres.write(“D:/Aspose Data/Footer.ppt”);