poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Hamacher" <eric.hamac...@enetrix.com>
Subject inserting images
Date Tue, 13 May 2008 18:50:00 GMT
 

 

 

Hello again:

 

Hello again:

 

I am successfully inserting images into an existing power point
presentation with the following code:

 

 

    public void insertIntoPPT() throws IOException{

        SlideShow ppt = new SlideShow(new
HSLFSlideShow("c:/test/test.ppt"));

        Slide slide18 = ppt.getSlides()[17];

        Slide slide19 = ppt.getSlides()[18];

        Slide slide20 = ppt.getSlides()[19];

       

        int index = ppt.addPicture(new File("c:/test/background.png"),
Picture.PNG);

        Picture pict = new Picture(index);

        pict.setAnchor(new java.awt.Rectangle(195, 50, 400, 500));

        slide18.addShape(pict); 

        

        index = ppt.addPicture(new
File("c:/test/actreflect_20080512.png"), Picture.PNG);

        pict = new Picture(index);

        pict.setAnchor(new java.awt.Rectangle(195, 50, 400, 500));

        slide19.addShape(pict); 

        

        index = ppt.addPicture(new
File("c:/test/actreflect_20080512.png"), Picture.PNG);

        pict = new Picture(index);

        pict.setAnchor(new java.awt.Rectangle(195, 50, 400, 500));

        slide20.addShape(pict); 

        

        FileOutputStream out = new FileOutputStream("c:/test/test.ppt");

        ppt.write(out);

        out.close();        

    }

 

 

The slides in question already had contained some text.  However, after
insertion of the images, the text loses its bold format.    Am I doing
something wrong?

 

Thanks.

 

 

Regards,

Eric Hamacher

 

******************************

THIS EMAIL IS INTENDED ONLY FOR THE REVIEW OF THE ADDRESSEE(S), AND MAY
CONTAIN CONFIDENTIAL AND LEGALLY PRIVILEGED INFORMATION. INTERCEPTION,
COPYING, DISSEMINATION, OR OTHER USE BY OTHER THAN THE ADDRESSEE(S) IS
PROHIBITED AND MAY BE PENALIZED UNDER APPLICABLE PRIVACY LAWS. IF YOU
RECEIVED THIS EMAIL IN ERROR, PLEASE DELETE IT AND NOTIFY ME BY RETURN
EMAIL TO eric.hamacher@enetrix.com *******************************

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message