import com.sini.com.spire.doc.documents.HeaderFooterType;
HeaderFooter footer = section.getHeadersFooters().getFooter();
if (footer != null) {
// 获取页脚内容
for (int ff =0; ff < footer.getParagraphs().getCount() ; ff ++) {
Paragraph paragraph = (Paragraph)footer.getParagraphs().get(ff);
String content = paragraph .getText();
System.out.println("页脚&##### :" + content);
// for (int pp =0;pp< paragraph.getChildObjects().getCount();pp++) {
// String content = paragraph.getChildObjects().get(pp).toString();
// System.out.println("页脚&##### :" + content);
// }
}
如果在页脚里写文字 ,则一点问题都没有。
但是,页脚里只有页码的时候,则什么都取不到。
要怎么样才可以取到页脚里的页码呢?