PHPackages                             andreygrin/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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. andreygrin/pdfmerger

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

andreygrin/pdfmerger
====================

PDFMerger for PHP with Laravel support

1.0.5(5y ago)0561LGPL-3.0-or-laterPHPPHP &gt;=5.2.0

Since Jan 5Pushed 5y agoCompare

[ Source](https://github.com/AndreyGrin/PDFMerger)[ Packagist](https://packagist.org/packages/andreygrin/pdfmerger)[ Docs](https://github.com/AndreyGrin/PDFMerger)[ RSS](/packages/andreygrin-pdfmerger/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

\#PDFMerger for PHP (PHP 5/Laravel Compatible)

Original written by  port to PHP 5 by I've forked it from  to update FPDF version and have support of php 7.4+

Laravel Compatible
------------------

[](#laravel-compatible)

Laravel compatibility tested on v8. Sample file adapted for Laravel

### Example Usage

[](#example-usage)

```
$pdf = new \PDFMerger;

$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');

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

### Laravel example\\

[](#laravel-example)

```
use \PDFMerger;

$pdf = new PDFMerger();

$pdf->addPDF(storage_path('app/public/' . 'samplepdfs/one.pdf'), '1, 3, 4')
	->addPDF(storage_path('app/public/' . 'samplepdfs/two.pdf'), '1-2')
	->addPDF(storage_path('app/public/' . 'samplepdfs/three.pdf'), 'all')
	->merge('file', storage_path("app/public/merged_pdf.pdf"));
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 68.4% 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 ~462 days

Total

5

Last Release

1928d ago

### Community

Maintainers

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

---

Top Contributors

[![rguedes](https://avatars.githubusercontent.com/u/1434822?v=4)](https://github.com/rguedes "rguedes (13 commits)")[![AndriiHrynchuk](https://avatars.githubusercontent.com/u/65897232?v=4)](https://github.com/AndriiHrynchuk "AndriiHrynchuk (2 commits)")[![gilenoranna](https://avatars.githubusercontent.com/u/1637826?v=4)](https://github.com/gilenoranna "gilenoranna (2 commits)")[![chbbc](https://avatars.githubusercontent.com/u/44181666?v=4)](https://github.com/chbbc "chbbc (1 commits)")[![timdiels1](https://avatars.githubusercontent.com/u/7079398?v=4)](https://github.com/timdiels1 "timdiels1 (1 commits)")

---

Tags

phplaravelpdf

### Embed Badge

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

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

###  Alternatives

[mpdf/mpdf

PHP library generating PDF files from UTF-8 encoded HTML

4.7k77.1M490](/packages/mpdf-mpdf)[webklex/laravel-pdfmerger

Generic PDF merger for Laravel

1422.6M2](/packages/webklex-laravel-pdfmerger)[mostafaznv/pdf-optimizer

PDF optimization tool for PHP and Laravel applications

170125.8k](/packages/mostafaznv-pdf-optimizer)[renatio/dynamicpdf-plugin

October HTML to PDF converter using dompdf library.

3113.4k3](/packages/renatio-dynamicpdf-plugin)

PHPackages © 2026

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