This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private File runReport(File template) throws ProcessingException { | |
// copy original template file into temp file | |
File tmpFile = IOUtility.createTempFile(IOUtility.getTempFileName(".docx"), IOUtility.getContent(template.getPath())); | |
DocxAdapter docxFile = new DocxAdapter(tmpFile); | |
Map<String, String> variables = new HashMap<String, String>(); | |
// populate doc variables | |
variables.put("Name", "John Doe"); | |
variables.put("Phone", "(123) 456 78 90"); | |
variables.put("CompanyName", "BSI Business Systems Integration AG"); |