poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathieu Grosmaire <mathieu.grosma...@gmail.com>
Subject HSLF multiple image insertion
Date Thu, 29 May 2008 13:39:51 GMT

Hello

I want to insert the same image on several slides, but it works only on the
first slide. 
For the others I've got a red cross.

Here a sample code :

	SlideShow ppt = new SlideShow();
			
	Slide s = ppt.createSlide();
	Slide s2 = ppt.createSlide();
	Slide s3 = ppt.createSlide();
			
	int idx = ppt.addPicture(new File("image.jpg"), Picture.JPEG);
	Picture pict = new Picture(idx);
	Picture pict2 = new Picture(idx);
	Picture pict3 = new Picture(idx);
			
	pict.setAnchor(new Rectangle(10,10,100,100));
	s.addShape(pict);
			
			
	pict2.setAnchor(new Rectangle(10,10,100,100));
	s2.addShape(pict2);
			
			
	pict3.setAnchor(new Rectangle(10,10,100,100));
	s3.addShape(pict3);

	FileOutputStream out = new FileOutputStream("report.ppt");
	ppt.write(out);
	out.close();

Thanks

MG
-- 
View this message in context: http://www.nabble.com/HSLF-multiple-image-insertion-tp17536146p17536146.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message