by jason » Tue Apr 02, 2019 6:53 pm
How many pages?
The high tech approach would be to use MergeDocx, part of the commercial Docx4j Enterprise Edition.
The low tech approach is simply to make a copies of the docx, containing different "chunks" of the MainDocumentPart's content list.
With the low tech approach each of the small docx files would contain all the images etc (ie include those not actually used in the "chunk"), but this probably doesn't matter for your application.
There are some issues to consider when splitting a document up, for example:
- does it contain sections which inherit from one another? you probably don't care if you are creating HTML.
- hyperlinks/cross references between chunks