java中word文档中的页数 [英] Number of pages in a word doc in java
本文介绍了java中word文档中的页数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种简单的方法可以计算 .doc 或 .docx 格式的 Word 文档的页数?
Is there an easy way to count the number of pages is a Word document either .doc or .docx?
谢谢
推荐答案
你可以试试 Apache API for word Docs:
You could try the Apache API for word Docs:
它作为一种获取页数的方法:
It as a method for getting the page count:
public int getPageCount()
退货:页数,如果 SummaryInformation 不包含页数,则为 0.
Returns: The page count or 0 if the SummaryInformation does not contain a page count.
这篇关于java中word文档中的页数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文