PHPackages                             el-gitto-junior/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. el-gitto-junior/docx-merge

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

el-gitto-junior/docx-merge
==========================

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

v1.0.2(7y ago)056MITPHPPHP &gt;=5.3.0

Since Nov 3Pushed 7y agoCompare

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

READMEChangelog (2)Dependencies (1)Versions (4)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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 72% 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 ~492 days

Total

3

Last Release

2860d ago

### Community

Maintainers

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

---

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)")[![ElGittoJunior](https://avatars.githubusercontent.com/u/41199135?v=4)](https://github.com/ElGittoJunior "ElGittoJunior (2 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/el-gitto-junior-docx-merge/health.svg)

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

###  Alternatives

[iio/libmergepdf

Library for merging multiple PDFs

40813.6M13](/packages/iio-libmergepdf)[krustnic/docx-merge

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

61193.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!

3685.2M19](/packages/gotenberg-gotenberg-php)[jurosh/pdf-merge

PHP PDF Merger

1522.2M5](/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.

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

PHPackages © 2026

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