PHPackages                             mpix/pdf-merger - 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. mpix/pdf-merger

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

mpix/pdf-merger
===============

Package for PDFMerger PHP 7.2

01PHP

Since Dec 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mpix32/PDFMerge)[ Packagist](https://packagist.org/packages/mpix/pdf-merger)[ RSS](/packages/mpix-pdf-merger/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#PDFMerger for PHP (PHP 5 and above up to PHP 7.1 Compatible)

PDFMerger created by Jarrod Nettles December 2009

Updated by Vasiliy Zaytsev February 2016

- Uses tcpdf 6.2.12 by Nicola Asuni
- Uses patched tcpdi\_parser 1.0 by Paul Nicholls with own TCPdiParserException
- Uses TCPDI 1.0 by Paul Nicholls with FPDF\_TPL extension 1.2.3 by Setasign
- Update each tcpdi by mpix for PHP 7.2

PHP 5 Compatible
----------------

[](#php-5-compatible)

I have made some changes in original codes to make PHPMerger compatible for PHP 5.

- Update

I tested with PHP 7.2 on my local machine and it still works.

Support of PDF 1.5 and PDF 1.6
------------------------------

[](#support-of-pdf-15-and-pdf-16)

FPDF and FPDI libraries replaced by TCPDF with TCPDI extension and parser.

### Example Usage

[](#example-usage)

```
include 'PDFMerger.php';

$pdf = new PDFMerger; // or use $pdf = new \PDFMerger; for Laravel

$pdf->addPDF('samplepdfs/one.pdf', '1, 3, 4');
$pdf->addPDF('samplepdfs/two.pdf', '1-2');
$pdf->addPDF('samplepdfs/three.pdf', 'all');

$pdf->merge('file', 'samplepdfs/TEST2.pdf'); // generate the file

$pdf->merge('download', 'samplepdfs/test.pdf'); // force download

// REPLACE 'file' WITH 'browser', 'download', 'string', or 'file' for output options
```

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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://www.gravatar.com/avatar/fb71ce0d100d559849aa66526a77cdac784f64a6628622790bbf88236d5a127e?d=identicon)[dhoni](/maintainers/dhoni)

---

Top Contributors

[![mpix32](https://avatars.githubusercontent.com/u/12228619?v=4)](https://github.com/mpix32 "mpix32 (2 commits)")

### Embed Badge

![Health badge](/badges/mpix-pdf-merger/health.svg)

```
[![Health](https://phpackages.com/badges/mpix-pdf-merger/health.svg)](https://phpackages.com/packages/mpix-pdf-merger)
```

###  Alternatives

[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.9k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

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