MSB wrote: > > Have just come across this; > > http://dev.plutext.org/blog/category/docx4j/ > http://dev.plutext.org/blog/category/docx4j/ > > and if you look at the forums there is even a post asking how to use the > api to merge .docx files. Seems that the styles still add confusion but it > could be a goodplace to start. As usual, I have not looked at the API yet > but it does appear to be well supported, actively manitained and used by a > number of people. Finally, it does have accompanying documentation and > some examples. >
Whether you use docx4j (which I maintain) or POI, there are 2 basic approaches to solving this problem. The first is to do what is necessary so ids point to the correct relationship (eg for images, hyperlinks), and styles are defined etc. A good explanation of what you need to do can be found at http://blogs.msdn.com/ericwhite/archive/2009/02/05/move-insert-delete-paragraphs-in-word-processing-documents-using-the-open-xml-sdk.aspx The second is to use altChunk: http://blogs.msdn.com/ericwhite/archive/2008/10/27/how-to-use-altchunk-for-document-assembly.aspx cheers, Jason -- View this message in context: http://www.nabble.com/Merging-word-2007-docx-with-POI-in-Cocoon-tp22485502p22552247.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
