PHP-获取Word文档中的页数 [英] PHP - Get number of pages in a Word document

查看:1231
本文介绍了PHP-获取Word文档中的页数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以使用PHP为现有Word文档计算页面数?

Is there a way to count number of pages using PHP for existing Word documents?

感谢您的帮助.

谢谢

推荐答案

要获取doc,docx,ppt和pptx的元数据属性(如页面数,PHP幻灯片的数量),我遵循以下过程,它的工作原理很吸引人我很高兴,下面是我遵循的流程,希望它对某人有帮助

To get meta data properties of doc,docx,ppt and pptx like number of pages, number of slides from PHP i followed the following process and it worked liked charm and iam so happy, below is the process i followed , hope it helps someone

Download and configure Apache Tika.

完成后,您可以尝试执行以下命令,它将提供有关文件的所有元数据

once its done you could try executing the following commadn it will give all the meta data about your file

java -jar tika-app-1.5.jar -m test.docx
java -jar tika-app-1.5.jar -m test.doc
java -jar tika-app-1.5.jar -m test.pptx
java -jar tika-app-1.5.jar -m test.ppt

经过测试,您可以在PHP script中执行此命令.谢谢.

once tested you can execute this comman in PHP script. Thanks.

这篇关于PHP-获取Word文档中的页数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆