ByteArrayInputStream docxTemplateIs = new ByteArrayInputStream(Resources.toByteArray(templateUrl));
java.io.File targetFile = new java.io.File(System.getProperty("user.dir") + "/Generated.docx");
FileOutputStream targetFos = new FileOutputStream(targetFile);
DocxService docxService = new DocxService();
WordprocessingMLPackage docxTemplate = docxService.loadPackage(docxTemplateIs);
docxService.merge(html, docxTemplate, targetFos, MatchingPolicy.LAX);
}