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

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

fcarbah/pdfmerger
=================

PDF File Merger for PHP5

v1.0.6(6y ago)031[1 PRs](https://github.com/fcarbah/pdfmerger/pulls)MITPHPCI passing

Since Jul 4Pushed 9mo agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

PDFMerger for PHP (PHP 5 &amp; 7 Compatible)
--------------------------------------------

[](#pdfmerger-for-php-php-5--7-compatible)

Uses Setasign/FPDI-FPDF

To install add this line to your composer.json

`"fcarbah/pdf-merger": "^1.0"`

or

`composer require fcarbah/pdf-merger: "^1.0"`

### Example Usage

[](#example-usage)

```
use Fcarbah\Classes\PdfMerger;
use Fcarbah\Classes\Orientation;
use Fcarbah\Classes\OutputFormat;

$pdf = new PdfMerger();

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

//You can optionally specify a different orientation for each PDF
$pdf->addPdf('samplepdfs/one.pdf', '1, 3, 4', Orientation::POTRAIT);
$pdf->addPdf('samplepdfs/two.pdf', '1-2', Orientation::LANDSCAPE);

$pdf->merge(OutPutFormat::STRING, 'samplepdfs/TEST2.pdf', Orientation::POTRAIT);

// This will be used for every PDF that doesn't have an orientation specified
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance41

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2507d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6174b27954a301a514a4dbfd65da4be5e4531f7c50f5f730ee3d53476e16ea3e?d=identicon)[fcarbah](/maintainers/fcarbah)

---

Top Contributors

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

### Embed Badge

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

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

###  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)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

426.1M30](/packages/setasign-tfpdf)

PHPackages © 2026

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