I'm using Docx4j with Java/Spring and i've built a service that replaces some placeholders in a document with variable values.
So in my docx I have a "placeholder" like this: [address] that I'm replacing with 5 different variables combined.
My code to do so is:
Docx4JSRUtil.searchAndReplace(template, Stream.of(new String[][] {
"[address]", "" + cust_street + " " + " " + cust_locality + " " + cust_cap ""
}
So actually my code replaces the placeholder with all the values on the same line. But what i actually need to accomplish is to write these 3 variables on 2 different lines with a line break.
So instead of a result like: cust street cust locality cust cap
I need a result like:
cust street
cust locality cust cap
Thanks to all in advance :)