PHPackages                             n-osennij/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. n-osennij/docx-merge

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

n-osennij/docx-merge
====================

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

1.1(1y ago)1171MITPHPPHP &gt;=5.3.0

Since Aug 16Pushed 1y agoCompare

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

READMEChangelogDependencies (1)Versions (3)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

23

—

LowBetter than 26% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

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

686d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/311626?v=4)[Dawid 'DeyV' Polak](/maintainers/DeyV)[@DeyV](https://github.com/DeyV)

---

Top Contributors

[![krustnic](https://avatars.githubusercontent.com/u/1822176?v=4)](https://github.com/krustnic "krustnic (18 commits)")[![n-osennij](https://avatars.githubusercontent.com/u/17576299?v=4)](https://github.com/n-osennij "n-osennij (5 commits)")[![Zlob](https://avatars.githubusercontent.com/u/3818931?v=4)](https://github.com/Zlob "Zlob (4 commits)")

---

Tags

docxmergeplaceholder

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[krustnic/docx-merge

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

62207.8k](/packages/krustnic-docx-merge)[iio/libmergepdf

Library for merging multiple PDFs

40814.5M20](/packages/iio-libmergepdf)[gotenberg/gotenberg-php

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

3856.2M31](/packages/gotenberg-gotenberg-php)[jurosh/pdf-merge

PHP PDF Merger

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

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

PHPackages © 2026

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