Page 1 of 1

Is there a way to merge multiple documents ?

PostPosted: Wed May 12, 2010 7:57 pm
by vikrant
I have to build a document using multiple templates, is there a way to achieve this ?

thanks in Advance.

Re: Is there a way to merge multiple documents ?

PostPosted: Wed May 12, 2010 11:27 pm
by jason
You've got 2 choices.

The first is the altChunk approach; it can be used not just for HTML, but also for including Word docs.

The second is to stitch the documents together. ie for each foreign paragraph you include, ensure that all rels are also included, and styles used are defined etc. This approach is more effort, but may be worthwhile depending on how predictable the documents you are dealing with are (ie can you limit the scope of the problem), and other aspects unique to your situation.

Google will find you materials on each approach in Microsoft blog posts (generic to OpenXML, not specific to docx4j); I think some of these posts are linked to in earlier posts in this forum.

Re: Is there a way to merge multiple documents ?

PostPosted: Sat Jan 08, 2011 1:42 pm
by jason