Question

I'm using XDocReport to create reports using a template like this:

«#foreach($developer in $developers)»«$developer.Name»
«#end»

My question is whether I can include an other document file in my template or not? Example:

«#foreach($developer in $developers)»«$developer.Name»
«#end»
«#include("./someOtherTemplate.odf")»

My goal is to recursively include other documents (fragments) which are edited by end users.

I've checked the Wiki pages but I did not find this option in XDocReport. Velocity supports inclusion. Did I miss something?

Note: I am free to use any document format (.odf, .docx, etc) supported by Word or LibreOffice.

Was it helpful?

Solution

Your requirement is not possible with XDocReport because it means that you wish to merge several ODT files which is a very hard task. Velocity #include works for a plain text file although an ODT file is a zip which contains several XML entries, so it's not possible to use #include in the XDocReport case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top