简体   繁体   English

有没有一种方法可以使用PHP从Word文档中解析出文本?

[英]Is there a way to parse the text out of a Word doc with PHP?

My client wants me to extract the text out of an MS Word doc from MS Office 97 and forward to 2011 versions. 我的客户希望我从MS Office 97的MS Word文档中提取文本,然后转发到2011版本。 Is there an API for that with PHP, free or commercial? 是否有PHP的免费或商业API?

EDIT : Oh man, look at the comments. 编辑 :哦,老兄,看看评论。 Yeah, I forgot to include "want this to work on Linux, as in CentOS Linux (like most shared Linux hosting plans)". 是的,我忘了包括“希望它像在CentOS Linux中一样在Linux上工作(就像大多数共享的Linux托管计划一样)”。

The only way I know of under linux is to use the Apache POI 我在linux下知道的唯一方法是使用Apache POI

http://poi.apache.org/ http://poi.apache.org/

It's Java, but it's supposed to read and write both the new XML based files, and the older OLE Compound document files. 它是Java,但应该读写新的基于XML的文件和较旧的OLE Compound文档文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM