It is possible but it takes a little more work than it should with the current API.
In my Wordinator project (https://github.com/drmacro/wordinator) I implemented support for generating DOCX files with multiple sections with section-specific headers and footers. You can crib the code I wrote (org.wordinator.xml2docx.generator.DocxGenerator.makeHeaderFooter(XWPFHeaderFooter, XmlObject)) I also see that I started working on an enhancement to the POI API for headers and footers but got sidetracked and haven't finished it--I don't know if I'll be able to find time for this but I still have my work lying around. Cheers, E. -- Eliot Kimber http://contrext.com On 1/3/20, 8:22 AM, "MBiel" <[email protected]> wrote: Hello all, I'm just starting using POI for docx. I need to replace headers/footers in document with a new ones taken from another document (whole content including pictures, tables fields, etc). Is it possible with POI? Any tips would be appreciated? Thanks Mirek -- Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
