Liking cljdoc? Tell your friends :D

Stencil Template Engine

Stencil is a templating engine to produce Office Open XML (mostly Microsoft Office's Word .docx files) from Java programs. It has a simple syntax and no programming is needed to write or modify document templates.

The aim of this project is to provide an easy-to-use and freely available tool for generating office documents.

stencil flow

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

Clojars Project CI codecov contributions welcome

Hits EPL 2.0


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

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.


Latest stable version is 0.5.3

Latest snapshot version is 0.5.4-SNAPSHOT

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

The dependency:


And the Clojars 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.3"]

Previous versions are available on the Stencil Clojars page.


Copyright (c) Janos Erdos. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 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.

Can you improve this documentation? These fine people already did:
Janos Erdos, janos erdos & erdos
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close