Tutorial2 - Apache POI PowerPoint Slides Example

Q

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

✍: FYIcenter.com

A

Tutorial2 example in the Apache POI package is created by Yegor Kozlov. It demonstrates how to create basic paragraph and text formatting on a PowerPoint slide in *.pptx format.

Tutorial2 example uses the OpenXML Slide Layout Format (XSLF) API, which supports PowerPoint slides in *.pptx format only.

Here is the command to run Tutorial2 to generate PowerPoint slide file in *.pptx file format compatible with Microsoft PowerPoint 2007 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-ooxml-3.15.jar;
         C:\local\poi-3.15\ooxml-lib\xmlbeans-2.6.0.jar;
         C:\local\poi-3.15\lib\commons-collections4-4.1.jar;
         C:\local\poi-3.15\poi-ooxml-schemas-3.15.jar 
   org.apache.poi.xslf.usermodel.Tutorial2

If you open the output file, text.pptx, in PowerPoint, you will see a slide with some text:
Apache POI PowerPoint Slide Example - Tutorial2

 

Apache POI Examples for PowerPoint Slides

⇒⇒FAQ for Apache POI (Poor Obfuscation Implementation)

2017-02-14, 457👍, 0💬