您可以读取该值
<Properties><Pages>CountValue</Pages>
来自docx包中的docProps / app.xml或
<office:document-meta> <office:meta> <meta:document-statistic meta:page-count="CountValue">
在odt包中形成meta.xml。
如果这些值不存在(它们是可选的),则必须对整个文档进行计算,实际上是执行渲染,这要困难得多

您可以读取该值
<Properties><Pages>CountValue</Pages>
来自docx包中的docProps / app.xml或
<office:document-meta> <office:meta> <meta:document-statistic meta:page-count="CountValue">
在odt包中形成meta.xml。
如果这些值不存在(它们是可选的),则必须对整个文档进行计算,实际上是执行渲染,这要困难得多