This page offers a short introduction into the XSLF API. More examples can be found in the XSLF Examples in the POI SVN repository.
The following code creates a new .pptx slide show and adds a blank slide to it:
The following code demonstrates how to iterate over shapes for each slide.
How it works:
The XSLFSlide object implements a draw(Graphics2D graphics) method that recursively paints all shapes in the slide into the supplied graphics canvas:
where graphics is a class implementing java.awt.Graphics2D. In PPTX2PNG the graphic canvas is derived from java.awt.image.BufferedImage, i.e. the destination is an image in memory, but in general case you can pass any compliant implementation of java.awt.Graphics2D. The PPTX2SVG example demonstrates how to use Apache Batik to convert .pptx slides into SVG format.