poi-tl (poi template language) is a free Java library that renders Microsoft Word templates with {{tags}} and a data model to produce docx output.
Overview
poi-tl is a Word template engine built on Apache POI. You prepare a docx template with double-brace tags, compile it, pass a map or object data model, and write the merged document to disk using a template-plus-data workflow.
Tags may appear in headers, footers, tables, text boxes, and other Word layout regions. The engine renders text, images, tables, lists, charts, conditional blocks, loops, code highlighting, Markdown segments, comments, attachments, and many other document elements described in the project documentation.
Spring EL expressions are supported for dynamic logic, and plugin hooks let you run custom functions inside templates. The library targets JDK 8 and newer with current Apache POI releases, and integrates via Maven or Gradle coordinates.
Compared with raw Apache POI coding, poi-tl advertises a lower-code API focused on template authoring rather than low-level XML manipulation.
Key features
- Double-brace Word templates
- Tables images and charts
- Condition and loop tags
- Spring EL expressions
- Markdown and code blocks
- Custom plugin functions
- Maven and Gradle packages
Use cases
- Mail-merge style documents
- Report generation from Java
- Contract and certificate batch output