Lately, I had the requirement to generate Word documents from specific templates and fill them dynamically with data. For this task, I compared the following Java libraries: Apache POI, iText PDF, Docx4j and XDocreports. I compared them while using the following characteristics: Possibility to replace variables, amount of additional dependencies, lines of code to generate…