PHPackages                             disalvo/pdf-lumen-bundle - 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. disalvo/pdf-lumen-bundle

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

disalvo/pdf-lumen-bundle
========================

Compatibility fork of tibonilab/pdf-lumen-bundle and k98kurz/pdf (dompdf wrapper) for Laravel Lumen

1.0.7.3(10y ago)0339MITPHPPHP &gt;=5.3.0

Since Jun 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/disalvo/pdf-lumen)[ Packagist](https://packagist.org/packages/disalvo/pdf-lumen-bundle)[ RSS](/packages/disalvo-pdf-lumen-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

Dompdf
======

[](#dompdf)

Compatibility fork of k98jurz/pdf-lumen that is a conversion of Thujohn/Pdf for Laravel Lumen 5.\* Simple Dompdf wrapper package (uses Dompdf stable version 0.5)

Installation Lumen &gt;= 5.4.\*
-------------------------------

[](#installation-lumen--54)

Add `tibonilab/pdf-lumen-bundle` to `composer.json`.

```
"tibonilab/pdf-lumen-bundle": "~2.0.0"

```

After require the right version tag for your Lumen installation run `composer update` to pull down the latest version of Pdf.

Open up `bootstrap/app.php` and add the service provider.

```
	$app->register('tibonilab\Pdf\PdfServiceProvider');
```

And add the alias.

```
    class_alias('tibonilab\Pdf\PdfFacade', 'PDF');
```

Usage
-----

[](#usage)

Show a PDF

```
$app->get('/', function () {
	$html = ''
			. 'Put your html here, or generate it with your favourite '
			. 'templating system.'
			. '';
	return PDF::load($html, 'A4', 'portrait')->show();
});
```

Download a PDF

```
$app->get('/', function () {
	$html = ''
			. 'Put your html here, or generate it with your favourite '
			. 'templating system.'
			. '';
	return PDF::load($html, 'A4', 'portrait')->download('my_pdf');
});
```

Returns a PDF as a string

```
$app->get('/', function () {
	$html = ''
			. 'Put your html here, or generate it with your favourite '
			. 'templating system.'
			. '';
	$pdf = PDF::load($html, 'A4', 'portrait')->output();
});
```

Multiple PDFs

```
for ($i=1;$iload(View::make('pdf.image'))->output();
	File::put(public_path('test'.$i.'.pdf'), $content);
}
PDF::clear();
```

Examples
--------

[](#examples)

Save the PDF to a file in a specific folder, and then mail it as attachement. By @w0rldart

```
define('BUDGETS_DIR', public_path('uploads/budgets')); // I define this in a constants.php file

if (!is_dir(BUDGETS_DIR)){
	mkdir(BUDGETS_DIR, 0755, true);
}

$outputName = str_random(10); // str_random is a [Laravel helper](http://laravel.com/docs/helpers#strings)
$pdfPath = BUDGETS_DIR.'/'.$outputName.'.pdf';
File::put($pdfPath, PDF::load($view, 'A4', 'portrait')->output());

Mail::send('emails.pdf', $data, function($message) use ($pdfPath){
	$message->from('us@example.com', 'Laravel');
	$message->to('you@example.com');
	$message->attach($pdfPath);
});
```

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

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 ~104 days

Recently: every ~200 days

Total

10

Last Release

3760d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/99a445a096c08e6f25e0bd969fb4b9531f98bc2f721596fb70735516c574ea37?d=identicon)[disalvo](/maintainers/disalvo)

---

Top Contributors

[![thujohn](https://avatars.githubusercontent.com/u/580699?v=4)](https://github.com/thujohn "thujohn (29 commits)")[![k98kurz](https://avatars.githubusercontent.com/u/4357561?v=4)](https://github.com/k98kurz "k98kurz (12 commits)")[![tibonilab](https://avatars.githubusercontent.com/u/4867995?v=4)](https://github.com/tibonilab "tibonilab (10 commits)")[![disalvo](https://avatars.githubusercontent.com/u/303916?v=4)](https://github.com/disalvo "disalvo (3 commits)")[![juukie](https://avatars.githubusercontent.com/u/2678657?v=4)](https://github.com/juukie "juukie (1 commits)")[![KennedyTedesco](https://avatars.githubusercontent.com/u/999232?v=4)](https://github.com/KennedyTedesco "KennedyTedesco (1 commits)")[![lintranex](https://avatars.githubusercontent.com/u/1006190?v=4)](https://github.com/lintranex "lintranex (1 commits)")[![chakphanu](https://avatars.githubusercontent.com/u/2822342?v=4)](https://github.com/chakphanu "chakphanu (1 commits)")[![w0rldart](https://avatars.githubusercontent.com/u/673081?v=4)](https://github.com/w0rldart "w0rldart (1 commits)")[![emilsundberg](https://avatars.githubusercontent.com/u/215958?v=4)](https://github.com/emilsundberg "emilsundberg (1 commits)")[![hardevine](https://avatars.githubusercontent.com/u/1171618?v=4)](https://github.com/hardevine "hardevine (1 commits)")[![jildertmiedema](https://avatars.githubusercontent.com/u/3383186?v=4)](https://github.com/jildertmiedema "jildertmiedema (1 commits)")

---

Tags

laravelpdflumendompdf

### Embed Badge

![Health badge](/badges/disalvo-pdf-lumen-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/disalvo-pdf-lumen-bundle/health.svg)](https://phpackages.com/packages/disalvo-pdf-lumen-bundle)
```

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M275](/packages/barryvdh-laravel-dompdf)[k98kurz/pdf-lumen

compatibility fork of k98kurz/pdf (dompdf wrapper) for Laravel Lumen

103.9k](/packages/k98kurz-pdf-lumen)

PHPackages © 2026

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