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

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

hakimio/pdfmerger
=================

PDF Merger for PHP

1.0.0(5y ago)269.4k↓32.4%3PHPPHP &gt;=5.2.0

Since Jun 24Pushed 5y ago2 watchersCompare

[ Source](https://github.com/hakimio/PDFMerger)[ Packagist](https://packagist.org/packages/hakimio/pdfmerger)[ RSS](/packages/hakimio-pdfmerger/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

PDFMerger for PHP
=================

[](#pdfmerger-for-php)

PDFMerger using `setasign\fpdi`. Compatible with PHP 7+.

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.

Instalation
-----------

[](#instalation)

To install the library add the following line to your composer.json:

```
composer require hakimio/pdfmerger
```

### Example Usage

[](#example-usage)

```
use hakimio\PDFMerger;

$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->setAuthor('sample author');
$pdf->setCreator('a sample creator');
$pdf->setSubject('Merged Attachments');
$pdf->setKeywords('some sample keywords');

$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

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.3% 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

1880d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59b5302dfdc5ea9077f88f3e376e81b676538f3cd2e4e515130c92c3d5e3e7a8?d=identicon)[hakimio](/maintainers/hakimio)

---

Top Contributors

[![hakimio](https://avatars.githubusercontent.com/u/768105?v=4)](https://github.com/hakimio "hakimio (19 commits)")[![myokyawhtun](https://avatars.githubusercontent.com/u/295096?v=4)](https://github.com/myokyawhtun "myokyawhtun (14 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/hakimio-pdfmerger/health.svg)

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

###  Alternatives

[mpdf/mpdf

PHP library generating PDF files from UTF-8 encoded HTML

4.7k85.8M608](/packages/mpdf-mpdf)[horstoeko/zugferd

A library for creating and reading european electronic invoices

4306.4M37](/packages/horstoeko-zugferd)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[atgp/factur-x

PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files

154947.6k4](/packages/atgp-factur-x)[myparcelnl/sdk

This package is designed to send and receive data from MyParcel by means of an API.

31536.1k29](/packages/myparcelnl-sdk)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M672](/packages/shopware-core)

PHPackages © 2026

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