I'm trying to add the page numbering in my document, I added the following code
FooterPart footerPart = new FooterPart();
footerPart.setPackage(wordMLPackage);
footerPart.setRelationshipType(Namespaces.FOOTER);
P paragrafo = factory.createP();
PPr ppr = factory.createPPr();
Jc jc = factory.createJc();
jc.setVal(JcEnumeration.RIGHT);
ppr.setJc(jc);
PStyle pStyle = new PStyle();
pStyle.setVal("Footer");
ppr.setPStyle(pStyle);
ParaRPr rPrPageNumber = factory.createParaRPr();
RStyle rStyle = factory.createRStyle();
rStyle.setVal("PageNumber");
rPrPageNumber.setRStyle(rStyle);
ppr.setRPr(rPrPageNumber);
paragrafo.setPPr(ppr);
R r = factory.createR();
CTSimpleField ctSimple = factory.createCTSimpleField();
ctSimple.setInstr("PAGE");
JAXBElement<CTSimpleField> fldSimple = factory.createPFldSimple(ctSimple);
R rSimple = factory.createR();
RPr rprSimple ...