PHPackages                             voinmerk/phpdocxtemplate - 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. voinmerk/phpdocxtemplate

ActiveProject

voinmerk/phpdocxtemplate
========================

PHP library which uses docx files as Twig templates

05PHP

Since Dec 28Pushed 3y agoCompare

[ Source](https://github.com/voinmerk/phpdocxtemplate)[ Packagist](https://packagist.org/packages/voinmerk/phpdocxtemplate)[ RSS](/packages/voinmerk-phpdocxtemplate/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/3653fb048189f8bb2754c783a7553274597909c57423c4d9ec50756c8205200f/68747470733a2f2f706f7365722e707567782e6f72672f62696e676f2d736f66742f706870646f637874656d706c6174652f762f737461626c652e706e67)](https://packagist.org/packages/bingo-soft/phpdocxtemplate)[![Build Status](https://camo.githubusercontent.com/9c1d7d266322262ef0fa7014cfaf5c03415b7c87002d529680520109fd639cce/68747470733a2f2f7472617669732d63692e6f72672f62696e676f2d736f66742f706870646f637874656d706c6174652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/bingo-soft/phpdocxtemplate)[![Minimum PHP Version](https://camo.githubusercontent.com/0e9ac047546796cfdbe1423d1f4d91c8f37d2fbb11614a7900bb7686aaa5401f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d3838393242462e737667)](https://php.net/)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e35c0b641cf3afcd56e56fe954397b72fe78b02a48c62396e1e2f79a74c38b22/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62696e676f2d736f66742f706870646f637874656d706c6174652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bingo-soft/phpdocxtemplate/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ba20268e41501eb1489ab03918834d64ff0fc869d61a73e1da51a96fed4c50de/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62696e676f2d736f66742f706870646f637874656d706c6174652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bingo-soft/phpdocxtemplate/?branch=master)

PhpDocxTemplate
===============

[](#phpdocxtemplate)

PhpDocxTemplate is a PHP library, which uses docx files as Twig templates

Installation
============

[](#installation)

Install PhpDocxTemplate, using Composer:

```
composer require bingo-soft/phpdocxtemplate

```

Basic example
=============

[](#basic-example)

```
use PhpDocxTemplate\PhpDocxTemplate;

$doc = "./templates/template1.docx";
$template = new PhpDocxTemplate($doc);
$template->render(["one" => "1", "two" => "2", "three" => "3", "four" => "4"]);
$template->save("./documents/report.docx");
```

Acknowledgements
----------------

[](#acknowledgements)

PhpDocxTemplate draws inspiration from [python-docx-template](https://github.com/elapouya/python-docx-template) and [PhpWord](https://github.com/PHPOffice/PHPWord) libraries.

License
-------

[](#license)

MIT

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 67.6% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28297752?v=4)[Evgeniy Voyt](/maintainers/voinmerk)[@voinmerk](https://github.com/voinmerk)

---

Top Contributors

[![vicvolk](https://avatars.githubusercontent.com/u/7192415?v=4)](https://github.com/vicvolk "vicvolk (46 commits)")[![bingo-soft](https://avatars.githubusercontent.com/u/48438172?v=4)](https://github.com/bingo-soft "bingo-soft (18 commits)")[![lugin1993](https://avatars.githubusercontent.com/u/61588612?v=4)](https://github.com/lugin1993 "lugin1993 (2 commits)")[![voinmerk](https://avatars.githubusercontent.com/u/28297752?v=4)](https://github.com/voinmerk "voinmerk (2 commits)")

### Embed Badge

![Health badge](/badges/voinmerk-phpdocxtemplate/health.svg)

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

PHPackages © 2026

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