

This seems to be the most straightforward one to me. Optionally the documents can then be converted to PDF, Word, RTF, etc. Template.createDocument(data, new FileOutputStream("output.odt")) getTemplate(new File("template.odt")) ĭata.put("picture", new RenderedImageSource(ImageIO.read(new File("/tmp/lena.png")))) Figure 6-5: When you save versions of a document, OpenOi'fice. Click Browse, and then select the location where you want to save your.

Then ask yourself what is the purpose of this line, and do i need to worry about for now, if not move on to something else.Ī complement of previously given solutions would be JODReports, which allows creating office documents and reports in ODT format (from templates, composed using the LibreOffice/ Writer word processor).ĭocumentTemplateFactory templateFactory = new DocumentTemplateFactory() ĭocumentTemplate template = templateFactory. Save a Word document in OpenDocument Text format Click the File tab. Just take it line by line and see what you understand, ie strings for loops etc, things that you should be familiar with. In the drop down menu, choose OpenDocument Text as the output. There are a total of 7 lines so shouldnt require too many changes. After the conversion is concluded, open the Word document. Please take a look at the third suggestion. I know java and stack may be a bit daunting, but putting a bit of effort to learn what you need here will ultimately payoff.
