I have the scenario where I want to perform a MergeField with the following input data records:
CITY EMPLOYEE
BRUSSELS JOHN
LONDON PETER
ESSEX PAUL
and where the input docx contains the following MergeField construct:
{ If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶
" ""}{ SET Place1 { MERGEFIELD CITY }}¶
{ If { Place2 } <> { Place1 }"¶
----------------------------Page Break--------------------------------
{ MERGEFIELD CITY }¶
¶
{ MERGEFIELD EMPLOYEE } }{ SET Place2 { MERGEFIELD CITY }}¶
So I want to have only one resulting output document with the data of the 3 records merged in it (each separated by a Page Break).
The basic MergeField example given on the Docx4j site works perfectly and can be used for the above input data records to create one separate document per record, but I don't seem to figure out how to use it to create only one resulting document.
Is the scenario that I'm trying to perform possible with Docx4j or doesn't it support that (yet)?