CTSectPr sectPr = doc.getDocument().getBody().addNewSectPr();
XWPFHeaderFooterPolicy headerFooterPolicy = new XWPFHeaderFooterPolicy(doc,sectPr);
XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
XWPFParagraph paragraph = header.createParagraph();
paragraph.setBorderBottom(Borders.THICK);
paragraph.setAlignment(ParagraphAlignment.CENTER);
paragraph.getCTP().addNewPPr().addNewRPr().set(xmlToken);
在WPS下无法生成页眉,在MS word下是正常。页脚也同样是这种情况。求解答
我也是同样的问题,手机版wps就显示,windows版不显示
https://blog.csdn.net/made_in_zhong/article/details/90476112