PHPackages                             azakur4/lum-pdf - 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. azakur4/lum-pdf

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

azakur4/lum-pdf
===============

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

1.0.0(10y ago)0661MITPHPPHP &gt;=5.3.0

Since Jun 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Azakur4/lum-pdf)[ Packagist](https://packagist.org/packages/azakur4/lum-pdf)[ RSS](/packages/azakur4-lum-pdf/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Dompdf
======

[](#dompdf)

Compatibility conversion of k98kurz/pdf-lumen for Laravel Lumen 5.\* Simple Dompdf wrapper package (uses Dompdf stable version 0.5)

By: Azakur4/lum-pdf

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

[](#installation)

Add `azakur4/lum-pdf` to `composer.json`.

```
"azakur4/lum-pdf": "dev-master"

```

Run `composer update` to pull down the latest version of Pdf.

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

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

Now add the alias.

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

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

[](#configuration)

Copy the default configuration file from the config folder of this project to your application root config folder `dompdf.php`

Now open up `bootstrap/app.php` and add this line:

```
   $app->configure('dompdf');
```

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

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3661d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1726914?v=4)[Jimmy Brian Anamaria Torres](/maintainers/Azakur4)[@Azakur4](https://github.com/Azakur4)

---

Top Contributors

[![thujohn](https://avatars.githubusercontent.com/u/580699?v=4)](https://github.com/thujohn "thujohn (29 commits)")[![Azakur4](https://avatars.githubusercontent.com/u/1726914?v=4)](https://github.com/Azakur4 "Azakur4 (12 commits)")[![k98kurz](https://avatars.githubusercontent.com/u/4357561?v=4)](https://github.com/k98kurz "k98kurz (11 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)")[![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)")[![w0rldart](https://avatars.githubusercontent.com/u/673081?v=4)](https://github.com/w0rldart "w0rldart (1 commits)")[![chakphanu](https://avatars.githubusercontent.com/u/2822342?v=4)](https://github.com/chakphanu "chakphanu (1 commits)")[![emilsundberg](https://avatars.githubusercontent.com/u/215958?v=4)](https://github.com/emilsundberg "emilsundberg (1 commits)")

---

Tags

laravelpdflumendompdf

### Embed Badge

![Health badge](/badges/azakur4-lum-pdf/health.svg)

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

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k95.2M359](/packages/barryvdh-laravel-dompdf)[k98kurz/pdf-lumen

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

103.9k](/packages/k98kurz-pdf-lumen)[renatio/dynamicpdf-plugin

October HTML to PDF converter using dompdf library.

3013.4k3](/packages/renatio-dynamicpdf-plugin)

PHPackages © 2026

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