opensagres / xdocreport

XDocReport means XML Document reporting. It's Java API to merge XML document created with MS Office (docx) or OpenOffice (odt), LibreOffice (odt) with a Java model to generate report and convert it if you need to another format (PDF, XHTML...).
https://github.com/opensagres/xdocreport
1.22k stars 372 forks source link

docx from docx template (and dito for odt --> odt, etc.) #122

Open edwin-hendriks opened 8 years ago

edwin-hendriks commented 8 years ago

The current XDoc library enables us to generate PDF files with a docx template. We would however also be able generate a DOCX file based on a DOCX template (and a ODT file on a ODT template etc.).

Based on the current documentation we are are not able to determine if it is possible to do that and if so how?

This issue is a request for making this possible with the XDoc library, and/or (if it is already possible) to explain how.

angelozerr commented 8 years ago

When you generate a PDF from a docx template you use IXDocReport#convert method. In this case the process is docx template -> generated docx (in memory) -> pdf

If I have understood your requirement, you wish generate a docx from a docx template. You must use IXDocReport#process method in this case.

Please takes time to read https://github.com/opensagres/xdocreport/wiki/DocxReportingQuickStart and https://github.com/opensagres/xdocreport/wiki/ODTReportingQuickStart