It is currently Tue Jun 24, 2025 11:54 am
FooterPart footerPart = new FooterPart();
footerPart.setPackage(wordMLPackage);
footerPart.getContent().add(createStampP()); // predefined paragraph with a sample text
Relationship relationship = wordMLPackage.getMainDocumentPart().addTargetPart(footerPart);
SectPr sectPr = sectionWrapper.getSectPr();
if (sectPr == null) {
sectPr = factory.createSectPr();
wordMLPackage.getMainDocumentPart().addObject(sectPr);
sectionWrapper.setSectPr(sectPr);
}
FooterReference footerReference = factory.createFooterReference();
footerReference.setId(relationship.getId());
footerReference.setType(hdrFtrRef); // DEFAULT
sectPr.getEGHdrFtrReferences().add(footerReference);
Total posts 10181 • Total topics 2864 • Total members 2095