PHPackages                             madnh/phpword - 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. [Templating &amp; Views](/categories/templating)
4. /
5. madnh/phpword

ActiveLibrary[Templating &amp; Views](/categories/templating)

madnh/phpword
=============

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

0.13.3(9y ago)0105LGPL-3.0PHPPHP &gt;=5.3.3

Since Jan 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/madnh/PHPWord)[ Packagist](https://packagist.org/packages/madnh/phpword)[ Docs](http://phpoffice.github.io)[ RSS](/packages/madnh-phpword/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (3)Dependencies (12)Versions (17)Used By (0)

[![PHPWord](https://camo.githubusercontent.com/a6d097ba5a038dd7bdd585725993c9b4f84fc3991db442a45e4477ed08634ec4/68747470733a2f2f7261776769742e636f6d2f5048504f66666963652f504850576f72642f646576656c6f702f646f63732f696d616765732f706870776f72642e737667 "PHPWord")](https://camo.githubusercontent.com/a6d097ba5a038dd7bdd585725993c9b4f84fc3991db442a45e4477ed08634ec4/68747470733a2f2f7261776769742e636f6d2f5048504f66666963652f504850576f72642f646576656c6f702f646f63732f696d616765732f706870776f72642e737667)
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#)

Set image:

```
$templateProcessor->setImg('imageHolder', __DIR__ . DIRECTORY_SEPARATOR . 'resources/image.png');
//or
$templateProcessor->setImg('imageHolder', array('src' => __DIR__ . DIRECTORY_SEPARATOR . 'resources/image.png', 'swh' => '250'));
```

Set text:

```
$templateProcessor->setValue('serverName', realpath(__DIR__));
$templateProcessor->setText('special_charts', 'http://www.foo.com/index.php?a=1&b=2');
```

Set multiple lines of text

```
$multi_line_text = implode("\n", ['Text', 'value', 'in', 'multiple', 'of', 'lines']);
$templateProcessor->setText('multi_line_text_1', $multi_line_text);
$templateProcessor->setText('multi_line_text_2', $multi_line_text, true);
```

View `samples/Sample_07_TemplateCloneRow.php` as example.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.4% 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 ~81 days

Recently: every ~142 days

Total

15

Last Release

3389d ago

PHP version history (2 changes)0.7.0PHP &gt;=5.3.0

0.9.0PHP &gt;=5.3.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8559855?v=4)[Đỗ Danh Mạnh](/maintainers/madnh)[@madnh](https://github.com/madnh)

---

Top Contributors

[![ivanlanin](https://avatars.githubusercontent.com/u/15313?v=4)](https://github.com/ivanlanin "ivanlanin (510 commits)")[![Progi1984](https://avatars.githubusercontent.com/u/1533248?v=4)](https://github.com/Progi1984 "Progi1984 (179 commits)")[![gabrielbull](https://avatars.githubusercontent.com/u/671923?v=4)](https://github.com/gabrielbull "gabrielbull (50 commits)")[![hskrtich](https://avatars.githubusercontent.com/u/1214484?v=4)](https://github.com/hskrtich "hskrtich (10 commits)")[![spikex](https://avatars.githubusercontent.com/u/5315?v=4)](https://github.com/spikex "spikex (8 commits)")[![jonnsn](https://avatars.githubusercontent.com/u/575971?v=4)](https://github.com/jonnsn "jonnsn (8 commits)")[![jhfangying](https://avatars.githubusercontent.com/u/86777?v=4)](https://github.com/jhfangying "jhfangying (7 commits)")[![jeroenmoors](https://avatars.githubusercontent.com/u/1665245?v=4)](https://github.com/jeroenmoors "jeroenmoors (6 commits)")[![madnh](https://avatars.githubusercontent.com/u/8559855?v=4)](https://github.com/madnh "madnh (5 commits)")[![andrew-kzoo](https://avatars.githubusercontent.com/u/2422378?v=4)](https://github.com/andrew-kzoo "andrew-kzoo (3 commits)")[![chc88](https://avatars.githubusercontent.com/u/6169170?v=4)](https://github.com/chc88 "chc88 (3 commits)")[![githubjeka](https://avatars.githubusercontent.com/u/874234?v=4)](https://github.com/githubjeka "githubjeka (3 commits)")[![h6w](https://avatars.githubusercontent.com/u/1045361?v=4)](https://github.com/h6w "h6w (3 commits)")[![kazitanvirahsan](https://avatars.githubusercontent.com/u/6487015?v=4)](https://github.com/kazitanvirahsan "kazitanvirahsan (3 commits)")[![ozilion](https://avatars.githubusercontent.com/u/4831128?v=4)](https://github.com/ozilion "ozilion (2 commits)")[![troosan](https://avatars.githubusercontent.com/u/6959414?v=4)](https://github.com/troosan "troosan (2 commits)")[![siwinski](https://avatars.githubusercontent.com/u/1034024?v=4)](https://github.com/siwinski "siwinski (2 commits)")[![zacharymarshal](https://avatars.githubusercontent.com/u/321407?v=4)](https://github.com/zacharymarshal "zacharymarshal (1 commits)")[![likeuntomurphy](https://avatars.githubusercontent.com/u/2012253?v=4)](https://github.com/likeuntomurphy "likeuntomurphy (1 commits)")[![maartenba](https://avatars.githubusercontent.com/u/485230?v=4)](https://github.com/maartenba "maartenba (1 commits)")

---

Tags

php-librarywordphppdfhtmldocodftemplatewordOpenXMLdocxodtwriterrtfreaderofficePhpOfficePhpWordOOXMLOffice Open XMLISO IEC 29500WordprocessingMLRich Text FormatOpenDocumenttemplate processor

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/madnh-phpword/health.svg)

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

PHPackages © 2026

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