A C# library for generating PDF documents from strongly-typed, fluent code instead of HTML-to-PDF conversion.
Sayi/poi-tl
A Java template engine that generates Word (.docx) documents from templates with tags, built on Apache POI.
Open-source alternative to:Aspose.Words
- Stars
- 5,169
- Forks
- 1,131
- Open issues
- 64
- Last commit
- 9 days ago
What is it?
poi-tl (poi-template-language) generates new Word documents from a .docx template and a data model. Tags such as {{name}} are replaced with text, pictures, tables, lists, or charts, while the formatting of the template, including fonts, colors, and layout, is kept in the output.
The engine is logic-less: templates contain tags only, and conditional blocks or loops over collections are handled by tag types. Custom functions can be attached to tags through a RenderPolicy plugin interface. Optional extensions add code syntax highlighting and Markdown-to-Word conversion, and SpringEL expressions are supported.
The library requires JDK 1.8+ and Apache POI 5.2.2+ for the current 1.12.x and 1.13.x line.
Key features
- 01Renders text, pictures, tables, numbered lists and charts into Word templates.
- 02Supports conditional blocks and foreach loops, including table row and column loops.
- 03Preserves template styling in generated documents.
- 04Offers a plugin interface (RenderPolicy) for custom logic at any tag.
- 05Supports comments, attachments, bookmarks, hyperlinks and nested sub-templates.
Use cases
- Generating contracts, invoices or reports in Java backends from a Word template.
- Exporting data-driven Word documents in a web application for download.
- Producing Word files with dynamic tables and charts from application data.
Quick start
- 1
Add the poi-tl Maven dependency (version 1.12.2) to your project
- 2
Create a Word template containing the tag {{title}}, then compile, render and write the output in Java
Things to know
- Requires JDK 1.8+ and Apache POI 5.2.2+; older POI versions cause runtime errors.
Topics
FAQ
- What is poi-tl?
- A Java template engine that generates Word (.docx) documents from templates with tags, built on Apache POI. poi-tl (poi-template-language) generates new Word documents from a .docx template and a data model. Tags such as {{name}} are replaced with text, pictures, tables, lists, or charts, while the formatting of the template, including fonts, colors, and layout, is kept in the output.
- Is poi-tl free to use? What license does it have?
- poi-tl is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is poi-tl still maintained?
- Actively maintained. The last commit to poi-tl was on Oct 13, 2026.
- What can I use poi-tl for?
- Generating contracts, invoices or reports in Java backends from a Word template. Exporting data-driven Word documents in a web application for download. Producing Word files with dynamic tables and charts from application data.
- How do I install poi-tl?
- Add the poi-tl Maven dependency (version 1.12.2) to your project Create a Word template containing the tag {{title}}, then compile, render and write the output in Java
- Where can I get poi-tl?
- The source code and installation instructions are on GitHub: https://github.com/Sayi/poi-tl
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Claude Code-style skill that converts files and web pages to Markdown, turns Markdown into styled HTML or print-ready DOCX, and archives HTML back to Markdown.
Python CLI that turns GitHub READMEs, Markdown files and Jupyter notebooks into Word, PDF, PPTX, blog, LaTeX and other documentation formats.
A JavaScript library and CLI that converts .docx Word documents into clean, semantic HTML.
A Java library for reading and writing Excel and CSV spreadsheets with low memory use, suited to large files.
A Windows tray tool that converts clipboard Markdown and AI chat HTML into Word, WPS, or Excel content using Pandoc.