How I can remove the pagenumbers from first page only. we are creating the page numbers like below.
- Code: Select all
public static void addPageNumberinHeader(WordprocessingMLPackage wordMLPackage, MainDocumentPart documentPart)
throws InvalidFormatException {
HeaderPart headerPart = new HeaderPart();
Relationship rel = documentPart.addTargetPart(headerPart);
headerPart.setJaxbElement(getHdr(wordMLPackage, documentPart, headerPart));
List<SectionWrapper> sections = wordMLPackage.getDocumentModel().getSections();
for (SectionWrapper section : sections) {
SectPr sectPr = section.getSectPr();
HeaderReference headerReference = objectFactory.createHeaderReference();
headerReference.setId(rel.getId());
headerReference.setType(HdrFtrRef.DEFAULT);
sectPr.getEGHdrFtrReferences().add(headerReference);
}
}