PHPackages                             trpro/pdf-merger - 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. trpro/pdf-merger

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

trpro/pdf-merger
================

PDF File Merger for PHP 5 &amp; 7, for usage with SetAsign FPDI.

1740PHP

Since Jan 7Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PDFMerger for PHP (PHP 5 amd 7 Compatible)
==========================================

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

Original written by
Forked from  which forked form  which forked from  which forked from

What's different from the other forks
=====================================

[](#whats-different-from-the-other-forks)

The orientation of each page can be keeped automaticly.

### Example Usage

[](#example-usage)

```
$pdf = new \Mayden\PDFMerger\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', 'L');
$pdf->addPDF('samplepdfs/two.pdf', '1-2', 'P);

$pdf->merge('file', 'samplepdfs/TEST2.pdf', 'A');

// REPLACE 'file' WITH 'browser', 'download', 'string', or 'file' for output options
// Last parameter is for orientation (P for protrait, L for Landscape, A for auto (can be overriden by the orientation-parameter from "addPage"!)).
// This will be used for every PDF that doesn't have an orientation specified
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor3

3 contributors hold 50%+ of commits

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/f44685ee6d6f15ddfcfaabb77e07df234723270322589b2a00897c4fadbb5d7b?d=identicon)[trpro](/maintainers/trpro)

---

Top Contributors

[![louis-mayden](https://avatars.githubusercontent.com/u/191222479?v=4)](https://github.com/louis-mayden "louis-mayden (7 commits)")[![myokyawhtun](https://avatars.githubusercontent.com/u/295096?v=4)](https://github.com/myokyawhtun "myokyawhtun (5 commits)")[![trpro](https://avatars.githubusercontent.com/u/7107313?v=4)](https://github.com/trpro "trpro (4 commits)")[![clegginabox](https://avatars.githubusercontent.com/u/2412400?v=4)](https://github.com/clegginabox "clegginabox (3 commits)")[![hpolthof](https://avatars.githubusercontent.com/u/1415623?v=4)](https://github.com/hpolthof "hpolthof (3 commits)")[![Choukk](https://avatars.githubusercontent.com/u/1766942?v=4)](https://github.com/Choukk "Choukk (3 commits)")[![wmather](https://avatars.githubusercontent.com/u/3214643?v=4)](https://github.com/wmather "wmather (2 commits)")

### Embed Badge

![Health badge](/badges/trpro-pdf-merger/health.svg)

```
[![Health](https://phpackages.com/badges/trpro-pdf-merger/health.svg)](https://phpackages.com/packages/trpro-pdf-merger)
```

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[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.2k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)[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)[aspera/xlsx-reader

Spreadsheet reader library for XLSX files

52742.2k5](/packages/aspera-xlsx-reader)

PHPackages © 2026

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