Graphics2DDemo - Apache POI PowerPoint Slides Example

Q

What is Graphics2DDemo example in the Apache POI package? How to run Graphics2DDemo example?

✍: FYIcenter.com

A

Graphics2DDemo example in the Apache POI package is created by Yegor Kozlov. It provides a simple bar chart demo in *.ppt format.

Graphics2DDemo example uses the Horrible Slide Layout Format (HSLF) API, which supports PowerPoint slides in *.ppt format only.

Here is the command to run Graphics2DDemo to generate PowerPoint slide file in *.ppt file format compatible with Microsoft PowerPoint 97 version.

C:\fyicenter>c:\local\jdk-1.8.0\bin\java 
   -cp .;C:\local\poi-3.15\poi-examples-3.15.jar;
         C:\local\poi-3.15\poi-3.15.jar;
         C:\local\poi-3.15\poi-scratchpad-3.15.jar 
   org.apache.poi.hslf.examples.Graphics2DDemo

If you open the output file, hslf-graphics.ppt, in PowerPoint, you will see a slide with a bar chart:
Apache POI PowerPoint Slide Example - Graphics2DDemo

 

Apache POI Examples for PowerPoint Slides

⇒⇒FAQ for Apache POI (Poor Obfuscation Implementation)

2017-02-08, 876👍, 0💬