Page 1 of 1

brand new to docx4j, project capabilities/requirement

PostPosted: Sat Apr 04, 2020 8:46 am
by svvparakala
Hi I just found out about this java api. Previously I've only known POI. I used POI in the past for an excel manipulation program, but now I am working on a DOCX automation project.
I would like to know how possible these requirements for my project are using docx4j:

1. Open template Document A, fill in missing information
2. Open template Document B, fill in missing information
3. Open template Document C, fill in missing information
4. Append Document A + B + C to create the final result.


Currently I am using Apache POI, and I have a way of replacing placeholder text in the template files. However, POI is pretty difficult because there is no way to copy an entire document into a new document, I am instead having to copy tables and paragraphs, but still some elements like Checkboxes and TextBoxes will go missing. Does docx4j offer a simpler way of copying an entire document and appending it to another one?

Re: brand new to docx4j, project capabilities/requirement

PostPosted: Sat Apr 04, 2020 9:07 am
by jason
Welcome! There are various approaches to filling in the missing information, but this isn't what you are asking about.

Regarding merging documents, this is a feature of the commercial Docx4j Enterprise. That said, for simple cases, you might not need it (if there are zero or a small number of issues you can handle yourself). It'll depend on the range of template documents you are using. See further https://www.docx4java.org/blog/2010/11/ ... documents/