You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by jaime <jg...@kfussion.com> on 2011/01/05 13:51:48 UTC

Showing pptx

The problem is that I made this method to display a ppt file 

 public ImageIcon display() throws JPresentationException { 

        Background background; 
        background = slides[current].getBackground(); 
        Fill f = background.getFill(); 
        Color color = f.getForegroundColor(); 
        Dimension dimension = ppt.getPageSize(); 
        shapes = slides[current].getShapes(); 
        BufferedImage img = new BufferedImage(dimension.width,
dimension.height, BufferedImage.TYPE_INT_RGB); 
        Graphics2D graphics = img.createGraphics(); 
        graphics.setPaint(color); 
        graphics.fill(new Rectangle2D.Float(0, 0, dimension.width,
dimension.height)); 
        slides[current].draw(graphics); 
        ImageIcon icon = new ImageIcon(img); 
                
        return icon; 
} 

but now I intend to open pptx files so I change some types and the rest
works just fine (xslf instead of hslf) but the problem remain in the display
method cause I'm unable to display anything 

thanks  
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/Showing-pptx-tp3328733p3328733.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