I'm trying to add two different Headers from my template document. Unpacking the template shows me that there are two xml files:
header2.xml //this should be the header for the first page of the document
header1.xml //this should be the header for the rest of the document
Now I'm using this code:
WordprocessingMLPackage tempPkg = WordprocessingMLPackage.load(new File(templateFile));
List<SectionWrapper> sectionWrappers = tempPkg.getDocumentModel().getSections();
System.out.println("Sections\n");
for (SectionWrapper sw : sectionWrappers) {
HeaderFooterPolicy hfp = sw.getHeaderFooterPolicy();
System.out.println("Header");
if ...