PHPackages                             donnykurnia/l5mpdf - 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. donnykurnia/l5mpdf

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

donnykurnia/l5mpdf
==================

mPDF wrapper for Laravel 5

v0.0.5(6y ago)068MITPHPPHP &gt;=5.4.0

Since Mar 19Pushed 6y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (7)Used By (0)

mPDF Wrapper for Laravel 5
--------------------------

[](#mpdf-wrapper-for-laravel-5)

In development.

### License

[](#license)

[![License](https://camo.githubusercontent.com/f88d0e6f48a29688649da0f6f43395d6a4d501037b3077080b1f559fd62b1a50/68747470733a2f2f706f7365722e707567782e6f72672f646f6e6e796b75726e69612f6c356d7064662f6c6963656e7365)](https://packagist.org/packages/donnykurnia/l5mpdf)[![Latest Stable Version](https://camo.githubusercontent.com/30e489cb05e1d9c20bc622b26f70f8c8b8166fa55cd7640d92b43d61297bc1ff/68747470733a2f2f706f7365722e707567782e6f72672f646f6e6e796b75726e69612f6c356d7064662f762f737461626c65)](https://packagist.org/packages/donnykurnia/l5mpdf)

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

[](#instalation)

Add:

```
"donnykurnia/l5mpdf": "dev-master@dev",

```

To your `composer.json`

or Run:

```
composer require donnykurnia/l5mpdf

```

Then add:

```
'Servit\Mpdf\ServiceProvider',
```

To the `providers` array on your `config/app.php`

And

```
'PDF'     => 'Servit\Mpdf\Facades\Pdf',
```

To the `aliases` array on yout `config/app.php` in order to enable the PDF facade

Usage
-----

[](#usage)

```
$router->get('/pdf/view', function() {
    $pdf = \App::make('mpdf.wrapper', [
        'mode'   => 'id+aCJK',
        'format' => 'A4-L',
    ]);
    $pdf->WriteHTML('Page 1');
    $pdf->AddPage('P');
    $pdf->WriteHTML('Page 2');
    $pdf->stream();
});
```

### Force download

[](#force-download)

```
$router->get('/pdf/download', function() {
    $html = view('pdfs.example')->render();

    return PDF::load($html)->download();
});
```

### Output to a file

[](#output-to-a-file)

```
$router->get('/pdf/output', function() {
    $html = view('pdfs.example')->render();

    PDF::load($html)
        ->filename('/tmp/example1.pdf')
        ->output();

    return 'PDF saved';
});
```

This mPDF Wrapper for Laravel5 is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

Default config
--------------

[](#default-config)

These default config can be overridden when creating the `mpdf.wrapper`.

```
[
    'mode'                  => '',
    'format'                => 'A4',
    'defaultFontSize'       => '',
    'defaultFont'           => '',
    'marginLeft'            => 10,
    'marginRight'           => 10,
    'marginTop'             => 10,
    'marginBottom'          => 10,
    'marginHeader'          => 10,
    'marginFooter'          => 5,
    'orientation'           => 'P',
]
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

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

Every ~298 days

Total

5

Last Release

2513d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11b93f17787f812fe24b60d8b94cb095a80725de51fbdc971e9cdecf69624704?d=identicon)[donnykurnia](/maintainers/donnykurnia)

---

Top Contributors

[![limweb](https://avatars.githubusercontent.com/u/602579?v=4)](https://github.com/limweb "limweb (19 commits)")[![donnykurnia](https://avatars.githubusercontent.com/u/95402?v=4)](https://github.com/donnykurnia "donnykurnia (12 commits)")[![restuarifp](https://avatars.githubusercontent.com/u/5182230?v=4)](https://github.com/restuarifp "restuarifp (3 commits)")[![eduardocintra](https://avatars.githubusercontent.com/u/2051934?v=4)](https://github.com/eduardocintra "eduardocintra (2 commits)")

---

Tags

laravelpdfmpdf

### Embed Badge

![Health badge](/badges/donnykurnia-l5mpdf/health.svg)

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

###  Alternatives

[carlos-meneses/laravel-mpdf

Laravel Mpdf: Using Mpdf in Laravel to generate Pdfs.

4403.1M7](/packages/carlos-meneses-laravel-mpdf)

PHPackages © 2026

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