Hello Jason,
I am new to docx4j and I was trying to play with this and found something I was doing is not working.
I have a word template(attched:projecttemplate_input.docx) and I hand placed 'place holders' for replacing with dynamic values from database. In my java code, I am reading this template input file and loading WordprocessingMLPackage then I am substituting the place holders with dynamic data from backend. So far so good, replacing works great with help of examples I found in docx4j site. Here is what issues I am running into:
Issue #1) In my template I have a table with header(mulitiple column) and one template row with 'place holders' in it. As shown in exampls, I am adding dynamic data rows to the table and lastly remove the template row. But when table rows goes to second page, table headers are not repeating, data rows are printed right. Just not carrying the table headers when there is page break. To fix this, tried solution in ths link suggessted by Jason but still no luck.
http://www.docx4java.org/forums/docx-java-f6/insert-a-tableheader-t237.html
Issue #2) I have table with one row and one column and again replacing the place holders from backend is going great. But issue is about data printing. This data is concatenated string and placing '\n'(new line) between each string and expecting to print this whole concatenated string in seperate lines. but it is not working. I am using System.getProperty("line.separator"); for new line. Anything wrong with this. What I need is new line between string tokens in a concatenated string.
Also I am attaching input and output files here. Problem is table with UTILITY,UTL OR UADATES" table header for issue#1 and table with "COMMENTS" is for issue#2.
Please find attached and reply me with suggession to fix this isue.
Thanks in advance,
Goutham