Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.6 KB

README.md

File metadata and controls

59 lines (45 loc) · 1.6 KB

PPT Templates

Quality Gate Status

PPT Template is a small templating library to generate PowerPoint presentations. This project is mainly based on POI XSLF.

Templates are directly created in PowerPoint using a variable system. Templates must use the MS Office Open XML format, that means the file extension should be .pptx.

Getting started

Include PPT Templates in your project:

<dependency>
    <groupId>com.coreoz</groupId>
    <artifactId>ppt-templates</artifactId>
    <version>1.0.1</version>
</dependency>

Create a template and fill it with your data:

try(FileOutputStream out = new FileOutputStream("generated.pptx")) {
  new PptMapper()
    .text("title", "Hello")
    .text("subtitle", "World!")
    .processTemplate(PptTemplateDemo.class.getResourceAsStream("/title.pptx"))
    .write(out);
}

Tadaaa:

PPT template hello wold

Features

  • text replacement,
  • image replacement,
  • text and shape styling,
  • text, shape and image hiding.

This features are directly configurable via the com.coreoz.ppt.PptMapper API.

For image replacement, styling or hiding elements, variables must be put on a link on these elements.

Step 1:

Link on an image - step 1

Step 2:

Link on an image - step 2

Demo

See the demonstration project.