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

ActiveLibrary

mkrawczyk/pdfmerger
===================

PDFMerger for PHP (PHP 5 and up to PHP 7.1 Compatible)

1.0.1(3y ago)093PHPPHP &gt;=5.2.0

Since Nov 23Pushed 3y agoCompare

[ Source](https://github.com/matrix0123456789/PDFMerger)[ Packagist](https://packagist.org/packages/mkrawczyk/pdfmerger)[ RSS](/packages/mkrawczyk-pdfmerger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

\#PDFMerger for PHP (PHP 5 and above up to PHP 7.1 and PHP 8 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,6,7 and 8 Compatible
--------------------------

[](#php-567-and-8-compatible)

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

- Update

I tested with PHP 7.1 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.

### Using Namespace

[](#using-namespace)

```
require_once ('PDFMerger/PDFMerger.php');

use PDFMerger\PDFMerger;
$pdf = new PDFMerger;

$pdf->addPDF('a.pdf');
$pdf->addPDF('b.pdf');

$pdf->merge('download','merged.pdf');
```

### 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

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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

Every ~0 days

Total

2

Last Release

1271d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d22c6cf11e8aa56c21710b4dc40cfe951e4fbe8f90d435bdeb1440ab39b186e3?d=identicon)[matrix0123456789](/maintainers/matrix0123456789)

---

Top Contributors

[![myokyawhtun](https://avatars.githubusercontent.com/u/295096?v=4)](https://github.com/myokyawhtun "myokyawhtun (20 commits)")[![bwdutton](https://avatars.githubusercontent.com/u/4185661?v=4)](https://github.com/bwdutton "bwdutton (6 commits)")[![matrix0123456789](https://avatars.githubusercontent.com/u/4982159?v=4)](https://github.com/matrix0123456789 "matrix0123456789 (2 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/mkrawczyk-pdfmerger/health.svg)

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

PHPackages © 2026

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