PHPackages                             dvanderh/pdfmerger - 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. dvanderh/pdfmerger

ActiveLibrary

dvanderh/pdfmerger
==================

PDF File Merger for PHP5

1320PHP

Since Aug 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dvanderh/PDFMerger)[ Packagist](https://packagist.org/packages/dvanderh/pdfmerger)[ RSS](/packages/dvanderh-pdfmerger/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#PDFMerger for PHP (PHP 5 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

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

[](#php-5-compatible)

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

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.

Instalation
-----------

[](#instalation)

To install the library add the following line to your composer.json:

`"dvanderh/pdfmerger": "dev-master"`

### Example Usage

[](#example-usage)

```
$pdf = new \dvanderh\PDFMerger();

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

$pdf->setAuthor('sample author');
$pdf->setCreator('a sample creator');
$pdf->setSubject('Merged Attachments');
$pdf->setKeywords('some sample keywords');

$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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.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://www.gravatar.com/avatar/1e6dbe827b59b355eabc19189541b365fabf5fb602fa171bb5eab5d6edb47ad6?d=identicon)[dvanderh](/maintainers/dvanderh)

---

Top Contributors

[![myokyawhtun](https://avatars.githubusercontent.com/u/295096?v=4)](https://github.com/myokyawhtun "myokyawhtun (14 commits)")[![hakimio](https://avatars.githubusercontent.com/u/768105?v=4)](https://github.com/hakimio "hakimio (6 commits)")[![Kadmillos](https://avatars.githubusercontent.com/u/2362200?v=4)](https://github.com/Kadmillos "Kadmillos (1 commits)")[![notriddle](https://avatars.githubusercontent.com/u/1593513?v=4)](https://github.com/notriddle "notriddle (1 commits)")

### Embed Badge

![Health badge](/badges/dvanderh-pdfmerger/health.svg)

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

PHPackages © 2026

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