Page 1 of 1

Grabbing footer/header from a document

PostPosted: Thu Oct 22, 2009 12:14 am
by jbeltran
What's the best way to get a footer or header for a loaded document? I know that the actual relationship ID to the header or footer is in the sectPr at the end of the document, but I wasn't sure if there was a method to grab a part based on that relationship ID.

Any info would be greatly appreciated!

Thanks,
Justin

Re: Grabbing footer/header from a document

PostPosted: Thu Oct 22, 2009 2:05 am
by jason
Have a look at HeaderFooterPolicy.java

Its constructor currently only handles the last sectPr in the document, so if your document contains other sections which define their own headers/footers, you'll need to modify the code.

cheers .. Jason