Apache POIを使用してファイルからスライドを抽出しようとしていppt
ますが、問題はありませんがpptx
、ファイルを開いて同じことを行うつもりです。誰かがその方法を知っていますか?
ppt
これは、ファイルから画像を抽出するためのコードです。
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;
}