PHPackages                             dawn520/docx-merge - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. dawn520/docx-merge

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

dawn520/docx-merge
==================

Simple library for merging multiple MS Word ".docx" files into one

v1.0.0(10y ago)028MITPHPPHP &gt;=5.3.0

Since Nov 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dawn520/DocxMerge)[ Packagist](https://packagist.org/packages/dawn520/docx-merge)[ RSS](/packages/dawn520-docx-merge/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

DocxMerge
=========

[](#docxmerge)

Simple library for merging multiple MS Word ".docx" files into one

Features
--------

[](#features)

- Create valid docx for MS Office 2007 and above

Details
-------

[](#details)

- For working with docx's ZIP I'm using [TbsZip](http://www.tinybutstrong.com/apps/tbszip/tbszip_help.html)

Install
-------

[](#install)

```
php composer.phar require krustnic/docx-merge

```

Merge Example
-------------

[](#merge-example)

```
require "vendor/autoload.php";
use DocxMerge\DocxMerge;

$dm = new DocxMerge();
$dm->merge( [
    "templates/TplPage1.docx",
    "templates/TplPage2.docx"
], "/tmp/result.docx" );

```

setValues Example
-----------------

[](#setvalues-example)

```
# Use "${NAME}" in docx file to create placeholders

require "vendor/autoload.php";
use DocxMerge\DocxMerge;

$dm = new DocxMerge();
$dm->setValues( "templates/template.docx",
                "templates/result.docx",
				array( "NAME" => "Sterling", "SURNAME" => "Archer" ) );

```

Or with styles ("bold", "italic", "underline"):

```
$dm->setValues( "templates/template.docx",
                "templates/result.docx",
                [
    			    "NAME" => [
    			        [
                            "value"      => "Sterling",
                            "decoration" => [ "bold", "italic" ]
    			        ],
    			        [
                            "value"      => "Archer",
                            "decoration" => [ "bold", "underline" ]
    			        ]
    			    ]
                ]);

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

3892d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14613856?v=4)[Xixi Zhou](/maintainers/dawn520)[@dawn520](https://github.com/dawn520)

---

Top Contributors

[![krustnic](https://avatars.githubusercontent.com/u/1822176?v=4)](https://github.com/krustnic "krustnic (18 commits)")[![Zlob](https://avatars.githubusercontent.com/u/3818931?v=4)](https://github.com/Zlob "Zlob (4 commits)")[![dawn520](https://avatars.githubusercontent.com/u/14613856?v=4)](https://github.com/dawn520 "dawn520 (1 commits)")[![spaldos](https://avatars.githubusercontent.com/u/310954?v=4)](https://github.com/spaldos "spaldos (1 commits)")

---

Tags

docxmergeplaceholder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dawn520-docx-merge/health.svg)

```
[![Health](https://phpackages.com/badges/dawn520-docx-merge/health.svg)](https://phpackages.com/packages/dawn520-docx-merge)
```

###  Alternatives

[iio/libmergepdf

Library for merging multiple PDFs

40814.2M19](/packages/iio-libmergepdf)[krustnic/docx-merge

Simple library for merging multiple MS Word ".docx" files into one

60202.9k](/packages/krustnic-docx-merge)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3845.9M26](/packages/gotenberg-gotenberg-php)[jurosh/pdf-merge

PHP PDF Merger

1522.3M5](/packages/jurosh-pdf-merge)[vaites/php-apache-tika

Apache Tika bindings for PHP: extracts text from documents and images (with OCR), metadata and more...

1171.5M2](/packages/vaites-php-apache-tika)[aspose-cloud/aspose-words-cloud

Open, generate, edit, split, merge, compare and convert Word documents. Integrate Cloud API into your solutions to manipulate documents. Convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction.

31169.4k](/packages/aspose-cloud-aspose-words-cloud)

PHPackages © 2026

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