https://issues.apache.org/bugzilla/show_bug.cgi?id=56519
Bug ID: 56519
Summary: XSLFSlide.draw is not working with text embeded in
PPTX
Product: POI
Version: unspecified
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: HSLF
Assignee: [email protected]
Reporter: [email protected]
I tried converting slides into png.
It exported png, but the exported png contains only background. It is not
rendering text in it, also the exported background scale is too big that only
1/4 of the image is rendered as png.
Attached is the PPTX and the java code I am using.
//java code
FileInputStream is = new FileInputStream("KEY02.pptx");
XMLSlideShow ppt = new XMLSlideShow(is);
is.close();
Dimension pgsize = ppt.getPageSize();
XSLFSlide[] slide = ppt.getSlides();
for (int i = 0; i < slide.length; i++) {
BufferedImage img = new BufferedImage(pgsize.width, pgsize.height,
BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = img.createGraphics();
//clear the drawing area
graphics.setPaint(Color.white);
graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,
pgsize.height));
//render
slide[i].draw(graphics);
//save the output
FileOutputStream out = new FileOutputStream("slide-" + (i + 1) +
".png");
javax.imageio.ImageIO.write(img, "png", out);
out.close();
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]