Hey,
i'm trying to overwrite a footer of a document with potentally many sections with my own footer.
I use the following code, inspired by
this and the HeaderFooterCreate sample. This is all footer-related code i wrote.
Ftr ftr = FACTORY.createFtr();
FooterPart footerPart;
Relationship relationship;
try
{
footerPart = new FooterPart();
footerPart.setPackage(wordprocessingMLPackage);
footerPart.setJaxbElement(ftr);
relationship = wordprocessingMLPackage.addTargetPart(footerPart);
}
catch (InvalidFormatException exception)
{
throw new RuntimeException(exception);
}
// ftr.getContent().clear();
// for (TextParagraphConfiguration textParagraphConfiguration : paragraphs)
// ...