PHPackages                             pauljohnston/php-pdf-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. pauljohnston/php-pdf-merge

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

pauljohnston/php-pdf-merge
==========================

PHP PDF Merger

015PHP

Since Jan 18Pushed 2y agoCompare

[ Source](https://github.com/pauljohnston/php-pdf-merge)[ Packagist](https://packagist.org/packages/pauljohnston/php-pdf-merge)[ RSS](/packages/pauljohnston-php-pdf-merge/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PDF Merge for PHP
=================

[](#pdf-merge-for-php)

PDF Merge library for PHP.

Install with composer:

`composer require pauljohnston/php-pdf-merge`

Should add dependency:

```
"pauljohnston/php-pdf-merge": "^2.3"
```

Highlights
----------

[](#highlights)

Pdf merging with modes portrait/landscape.

Tested in Laravel10 framework (but still can be used without any framework as standalone utility).

Usage
-----

[](#usage)

```
// Autoload composer classes...

// and now we can use library
$pdf = new \Pauljohnston\PDFMerge\PDFMerger;

// add as many pdfs as you want
$pdf->addPDF('path/to/source/file.pdf', 'all', 'portrait')
  ->addPDF('path/to/source/file1.pdf', 'all')
  ->addPDF('path/to/source/file2.pdf', 'all', 'landscape');

// call merge, output format `file`
$pdf->merge('file', 'path/to/export/dir/file.pdf');
```

That's it!

Enjoy and leave star if you like it :)

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 86.2% 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/3ab19cff8087e1999f09531907487bff30db453f0475ba9d49f0e9541d27ae6e?d=identicon)[softlabs](/maintainers/softlabs)

---

Top Contributors

[![jurosh](https://avatars.githubusercontent.com/u/1630137?v=4)](https://github.com/jurosh "jurosh (25 commits)")[![it-can](https://avatars.githubusercontent.com/u/644288?v=4)](https://github.com/it-can "it-can (1 commits)")[![morrislaptop](https://avatars.githubusercontent.com/u/67807?v=4)](https://github.com/morrislaptop "morrislaptop (1 commits)")[![pauljohnston](https://avatars.githubusercontent.com/u/1242028?v=4)](https://github.com/pauljohnston "pauljohnston (1 commits)")[![sebastian-serfe](https://avatars.githubusercontent.com/u/11234528?v=4)](https://github.com/sebastian-serfe "sebastian-serfe (1 commits)")

### Embed Badge

![Health badge](/badges/pauljohnston-php-pdf-merge/health.svg)

```
[![Health](https://phpackages.com/badges/pauljohnston-php-pdf-merge/health.svg)](https://phpackages.com/packages/pauljohnston-php-pdf-merge)
```

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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