PHPackages                             jameskid/phpreaddocxmath - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jameskid/phpreaddocxmath

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jameskid/phpreaddocxmath
========================

php read docx include math

v1.3.8(5y ago)017JavaScriptPHP &gt;=7.0

Since Feb 3Pushed 5y agoCompare

[ Source](https://github.com/JamesKid/phpreaddocxmath)[ Packagist](https://packagist.org/packages/jameskid/phpreaddocxmath)[ RSS](/packages/jameskid-phpreaddocxmath/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (8)Used By (0)

phpreaddocxmath
===============

[](#phpreaddocxmath)

#### 介绍

[](#介绍)

##### php 读取远程docx文件，支持数学公式

[](#php-读取远程docx文件支持数学公式)

这是一个php读取word的docx
我写这个的目的是为了完成公司的一个需求，要求能读取word中的公式，图片，文字数据。大部分都是数学题，物理题，化学题
目前支持读取文本，图片，公式，表格 文本目前只支持下划线，加粗，删除线。不只是大小，颜色 不支持docx域。能读到内容，但是回现还没有找到解决方案 不支持适量矢量图(譬如wmf,emf)

#### 安装教程

[](#安装教程)

（1）git clone下来可以直接用cli运行demo

```
   cd phpreadocxmath/test
   php Demo.php

```

（2）支持composer安装

```
   composer require phpreaddocxmath/phpreaddocxmath

```

#### 使用说明

[](#使用说明)

1. php7.0以上版本
2. 需要php拓展 XSL extension 文档

#### 公式mathml兼容性

[](#公式mathml兼容性)

读取出出来的数学公式是mathml格式 IE浏览器，QQ浏览器，safri浏览器显示都没问题，但是Google显示有问题
查询了相关资料,Chrome浏览器在版本24的时候曾经昙花一现支持了下，不过很快就取消了支持，据说是出于安全考虑

我发先这个东西可以完美解决因浏览器问题，导致的数学公式显示问题 convent MATHML to MathJax，MathJax

js渲染的公式，如果是vue的页面，必须在页面加载完成后，再引入js才有效果。

```

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Recently: every ~23 days

Total

7

Last Release

1836d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6158899?v=4)[JamesKid](/maintainers/JamesKid)[@JamesKid](https://github.com/JamesKid)

---

Top Contributors

[![JamesKid](https://avatars.githubusercontent.com/u/6158899?v=4)](https://github.com/JamesKid "JamesKid (4 commits)")

### Embed Badge

![Health badge](/badges/jameskid-phpreaddocxmath/health.svg)

```
[![Health](https://phpackages.com/badges/jameskid-phpreaddocxmath/health.svg)](https://phpackages.com/packages/jameskid-phpreaddocxmath)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[kartik-v/yii2-widget-depdrop

Widget that enables setting up dependent dropdowns with nested dependencies (sub repo split from yii2-widgets)

814.9M18](/packages/kartik-v-yii2-widget-depdrop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
