我在文档的第二个section中 设置了页脚添加了页码 ,可是页脚却在第二个与第三个section中同时出现了
这是我的代码
我并不希望 页脚出现在目录当中
尝试过使用
builder.getCurrentSection().getHeadersFooters().clear();
清除section中的 页脚 可是并没有效果
@blp0124 如果页眉和页脚未定义或明确链接到上一节,则 MS Word 文档中的以下部分将继承页眉和页脚。 因此,在您的情况下,您应该取消链接页眉/页脚:
// Unlink header/footer of the section to avoid inheriting.
section.getHeadersFooters().linkToPrevious(false);
1 Like
感谢大佬,困扰一天了,
1 Like