PHPackages                             softplaceweb/laravel-10-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. softplaceweb/laravel-10-pdf-merger

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

softplaceweb/laravel-10-pdf-merger
==================================

Laravel Pdf Merger

1.1.9(7mo ago)14.7k—8.7%1MITPHPPHP &gt;=8.2

Since Jun 13Pushed 7mo agoCompare

[ Source](https://github.com/SoftPlaceWeb/laravel-10-pdf-merger)[ Packagist](https://packagist.org/packages/softplaceweb/laravel-10-pdf-merger)[ RSS](/packages/softplaceweb-laravel-10-pdf-merger/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (7)Versions (12)Used By (0)

Laravel PDF Merger based TCPDF
==============================

[](#laravel-pdf-merger-based-tcpdf)

[![Latest Stable Version](https://camo.githubusercontent.com/1c2abd544500a30ce79c2096cb2981eca04ac1768f3d3013b6658ace1d6bd113/68747470733a2f2f706f7365722e707567782e6f72672f736f6674706c6163657765622f6c61726176656c2d31302d7064662d6d65726765722f762f737461626c65)](https://packagist.org/packages/softplaceweb/laravel-10-pdf-merger) [![Total Downloads](https://camo.githubusercontent.com/8d1274f92ec0b608f48c2292ea6379c20e79e949123f07fbe930049d350b96af/68747470733a2f2f706f7365722e707567782e6f72672f736f6674706c6163657765622f6c61726176656c2d31302d7064662d6d65726765722f646f776e6c6f616473)](https://packagist.org/packages/softplaceweb/laravel-10-pdf-merger) [![Latest Unstable Version](https://camo.githubusercontent.com/2ed4a30417c0f4ef9fdf573d300d5cb66845aa0010761e85a44a95851faec3d6/68747470733a2f2f706f7365722e707567782e6f72672f736f6674706c6163657765622f6c61726176656c2d31302d7064662d6d65726765722f762f756e737461626c65)](https://packagist.org/packages/softplaceweb/laravel-10-pdf-merger) [![License](https://camo.githubusercontent.com/717bce3a7f2214afbc1cea821960512a2e0a9f89b127fb4cbe160257c1db3dfd/68747470733a2f2f706f7365722e707567782e6f72672f736f6674706c6163657765622f6c61726176656c2d31302d7064662d6d65726765722f6c6963656e7365)](https://packagist.org/packages/softplaceweb/laravel-10-pdf-merger)

A simple [Laravel](http://www.laravel.com) service provider with some basic configuration for including the [TCPDF library](http://www.tcpdf.org/) to allow you to merge PDF's in your Laravel application.

Compatibility from 1.3 to 1.7 versions, if attempt to merge version greater than 1.4 it convert through Ghosthscript.

The final result is a merged pdf file v 1.7

Requirements
------------

[](#requirements)

- PHP 8.0+
- Ghostscript (gs command on Linux)

Installation
------------

[](#installation)

The Laravel PDF Merger service provider can be installed via [composer](http://getcomposer.org) by requiring the `softplaceweb/laravel-10-pdf-merger` package in your project's `composer.json`.

```
composer require softplaceweb/laravel-10-pdf-merger

```

for lumen, you should add the following lines:

```
$app->register(Softplaceweb\PdfMerger\PdfMergerServiceProvider::class);
class_alias(Softplaceweb\PdfMerger\Facades\TCPDF::class, 'PDF');
```

That's it! You're good to go.

Here is a little example:

```
use Softplaceweb\PdfMerger\Facades\PdfMerger;

PdfMerger::addPDF('path/to/pdf1.pdf', 1)
->addPDF('path/to/pdf2.pdf', 'all')
->merge()
->save('new_file_name.pdf', 'browser');
```

or sending pdf's as array ...

```
use Softplaceweb\PdfMerger\Facades\PdfMerger;

PdfMerger::addPDF([
    [
        'filePath' => 'path/to/pdf1.pdf',
        'pages'    => 1,
    ],
    [
        'filePath' => 'path/to/pdf2.pdf',
    ],
])
->merge()
->save('new_file_name.pdf', 'browser');
```

You can extend functionality for this class and for a list of all available function take a look at the [TCPDF Documentation](https://tcpdf.org/docs/srcdoc/TCPDF/)

Configuration
-------------

[](#configuration)

Laravel Pdf Merger comes with some basic configuration. If you want to override the defaults, you can publish the config, like so:

```
php artisan vendor:publish --provider="Softplaceweb\PdfMerger\PdfMergerServiceProvider"

```

Now access `config/pdf-merger.php` to customize.

- use\_original\_header is to used the original `Header()` from TCPDF.
    - Please note that `PdfMerger::setHeaderCallback(function($pdf){})` overrides this settings.
- use\_original\_footer is to used the original `Footer()` from TCPDF.
    - Please note that `PdfMerger::setFooterCallback(function($pdf){})` overrides this settings.

Credits
-------

[](#credits)

- [oriceon/laravel-pdf-merger](https://github.com/oriceon/laravel-pdf-merger)
- [DALTCORE/lara-pdf-merger](https://github.com/DALTCORE/lara-pdf-merger)
- [elibyy/tcpdf-laravel](https://github.com/elibyy/tcpdf-laravel)
- [anton-am/pdf-version-converter](https://github.com/Anton-Am/pdf-version-converter)

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance62

Regular maintenance activity

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 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.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~67 days

Total

11

Last Release

237d ago

PHP version history (2 changes)1.0.0PHP &gt;8.0

1.1.6PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![SoftPlaceWeb-Dev](https://avatars.githubusercontent.com/u/107917935?v=4)](https://github.com/SoftPlaceWeb-Dev "SoftPlaceWeb-Dev (6 commits)")[![yaroslavpopovic](https://avatars.githubusercontent.com/u/12303752?v=4)](https://github.com/yaroslavpopovic "yaroslavpopovic (6 commits)")[![oriceon](https://avatars.githubusercontent.com/u/358823?v=4)](https://github.com/oriceon "oriceon (3 commits)")[![vincenzoSoft](https://avatars.githubusercontent.com/u/108322014?v=4)](https://github.com/vincenzoSoft "vincenzoSoft (2 commits)")

---

Tags

laravelpdfTCPDFmerger

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/softplaceweb-laravel-10-pdf-merger/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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