简体   繁体   English

PHP如何读取带有文本和图像的Word文档

[英]php how to read word document with text and images

is there any easy tool for reading text and images in a MS word document with php. 有没有简单的工具可以用php读取MS Word文档中的文本和图像。 is it possible? 可能吗?

Here is an example of the document: 这是文档的示例:

Some text
Some text
---------
| Image |
---------
Some text

how can i get the text and the image in order? 我如何才能按顺序获取文本和图像?

You can use PHPWord (which is part of PHPOffice ) 您可以使用PHPWord (它是PHPOffice的一部分)

PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. PHPWord是一个用纯PHP编写的库,它提供了一组用于读写不同文档文件格式的类。 The current version of PHPWord supports Microsoft Office Open XML (OOXML or OpenXML), OASIS Open Document Format for Office Applications (OpenDocument or ODF), Rich Text Format (RTF), HTML, and PDF. 当前版本的PHPWord支持Microsoft Office Open XML(OOXML或OpenXML),用于Office应用程序的OASIS开放文档格式(OpenDocument或ODF),富文本格式(RTF),HTML和PDF。

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

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