HdrDocument hdrDoc = HdrDocument.Factory.parse(hdrPart.getInputStream());
CTHdrFtr hdrFtr = hdrDoc.getHdr();
XWPFHeader hdr = new XWPFHeader(doc, hdrFtr);
// Assign it
Enum type = ref.getType();
assignHeader(hdr, type);
}
for(int i=0; i<sectPr.sizeOfFooterReferenceArray(); i++) {
// Get the footer
CTHdrFtrRef ref = sectPr.getFooterReferenceArray(i);
PackagePart ftrPart = doc.getPartById(ref.getId());
XWPFFooter ftr = new XWPFFooter(doc,
FtrDocument.Factory.parse(ftrPart.getInputStream()).getFtr());
// Assign it
Enum type = ref.getType();
assignFooter(ftr, type);
}
}