Templating engine for office documents.


Keywords
docx, ooxml, ooxml-parser, pptx, template-engine
License
EPL-2.0

Documentation

Stencil Template Engine

Stencil is an open source templating engine that transforms Office Open XML documents (mostly Microsoft Office's Word .docx files) from Java programs. It has a simple syntax and no programming is needed to write document templates.

stencil flow

You can use either Microsoft Word or LibreOffice to edit the document templates. The template expressions are just simple textual expressions, and you can even colour-code them to make your template more readable.

Clojars Project CI codecov contributions welcome

Hits EPL 2.0

Features

  • Works with docx and pptx files
  • Simple value substitution, conditional and repeating blocks
  • Substituting HTML text for dynamic text formatting
  • Dynamically replace images and links in the template
  • Show/hide rows and columns in tables

Getting Started with the Library

Getting Started with the Service

The project has a simple service implementation, which is available on GitHub Packages as a Container image.

Version

Latest stable version is 0.5.7

Latest snapshot version is 0.5.8-SNAPSHOT

If you are using Maven, add the followings to your pom.xml:

The dependency:

<dependency>
  <groupId>io.github.erdos</groupId>
  <artifactId>stencil-core</artifactId>
  <version>0.5.7</version>
</dependency>

And the Clojars repository:

<repository>
  <id>clojars.org</id>
  <url>https://repo.clojars.org</url>
</repository>

Alternatively, if you are using Leiningen, add the following to the :dependencies section of your project.clj file: [io.github.erdos/stencil-core "0.5.7"]

Previous versions are available on the Stencil Clojars page.

License

Copyright (c) Janos Erdos. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 2.0 (https://www.eclipse.org/legal/epl-2.0/) which can be found in the file LICENSE.txt at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.