I used the tutorial at
https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial4.java
to build a power point file with a table (no change to the source) and
then tried to draw that as an image using the code below, but I am not
seeing the table getting drawn to the image, it is simply blank. Can
anyone help me understand why this is not working? Is this a bug or
am I doing something incorrectly? Thanks in advance.
XMLSlideShow ppt = new XMLSlideShow(OPCPackage.open(file));
Dimension pgsize = ppt.getPageSize();
// convert each slide into a .svg file
XSLFSlide[] slide = ppt.getSlides();
for (int i = 0; i < slide.length; i++) {
String title = slide[i].getTitle();
System.out.println("Rendering slide " + (i + 1) + (title
== null ? "" : ": " + title));
BufferedImage image = new BufferedImage(pgsize.width,
pgsize.height, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = image.createGraphics();
graphics.setPaint(Color.white);
graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,
pgsize.height));
slide[i].draw(graphics);
ImageIO.write(image, "png", new FileOutputStream(name +
"-slide-" +
(i + 1) + ".png"));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]