PHPackages                             lara-igniter/laraigniter-dompdf - 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. lara-igniter/laraigniter-dompdf

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

lara-igniter/laraigniter-dompdf
===============================

A DOMPDF Wrapper for Laraigniter

v1.3.0(10mo ago)022MITPHPPHP ^7.4|^8.0

Since Sep 18Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/lara-igniter/laraigniter-dompdf)[ Packagist](https://packagist.org/packages/lara-igniter/laraigniter-dompdf)[ RSS](/packages/lara-igniter-laraigniter-dompdf/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelogDependencies (3)Versions (10)Used By (0)

DOMPDF Wrapper for Laraigniter
------------------------------

[](#dompdf-wrapper-for-laraigniter)

### Laraigniter wrapper for [Dompdf HTML to PDF Converter](https://github.com/dompdf/dompdf)

[](#laraigniter-wrapper-for-dompdf-html-to-pdf-converter)

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

[](#installation)

### Laraigniter

[](#laraigniter)

Require this package in your composer.json and update composer. This will download the package and the dompdf + fontlib libraries also.

```
composer require lara-igniter/laraigniter-dompdf

```

Using
-----

[](#using)

You can create a new DOMPDF instance and load a HTML string, file or view name. You can save it to a file, or stream (show in browser) or download.

```
    use Laraigniter\DomPDF\Facade\Pdf;

    $pdf = Pdf::view('emails.invoice', [
        'data' => $data
    ]);

    return $pdf->download('example.pdf');
```

or use the app() controller instance:

```
    $pdf = app('dompdf.wrapper');
    $pdf->html('Example PDF');

    return $pdf->stream();
```

Or use the facade:

You can chain the methods:

```
    return Pdf::file(public_path('emails/example.html'))
        ->save('example.pdf')
        ->stream('example.pdf');
```

You can change the orientation and paper size, and hide or show errors (by default, errors are shown when debug is on)

```
    Pdf::html($html)->setPaper('a4', 'landscape')
        ->setWarnings(false)
        ->save('example.pdf')
```

If you need the output as a string, you can get the rendered PDF with the output() function, so you can save/output it yourself.

### Configuration

[](#configuration)

The defaults configuration settings are set in `config/dompdf.php`.

You can still alter the dompdf options in your code before generating the pdf using this command:

```
    Pdf::setOption(['dpi' => 150, 'defaultFont' => 'sans-serif']);
```

Available options and their defaults:

- **rootDir**: "{app\_directory}/vendor/dompdf/dompdf"
- **tempDir**: "/tmp" *(available in config/dompdf.php)*
- **fontDir**: "{app\_directory}/storage/fonts" *(available in config/dompdf.php)*
- **fontCache**: "{app\_directory}/storage/fonts" *(available in config/dompdf.php)*
- **chroot**: "{app\_directory}" *(available in config/dompdf.php)*
- **logOutputFile**: "/tmp/log.htm"
- **defaultMediaType**: "screen" *(available in config/dompdf.php)*
- **defaultPaperSize**: "a4" *(available in config/dompdf.php)*
- **defaultFont**: "serif" *(available in config/dompdf.php)*
- **dpi**: 96 *(available in config/dompdf.php)*
- **fontHeightRatio**: 1.1 *(available in config/dompdf.php)*
- **isPhpEnabled**: false *(available in config/dompdf.php)*
- **isRemoteEnabled**: false *(available in config/dompdf.php)*
- **isJavascriptEnabled**: true *(available in config/dompdf.php)*
- **isHtml5ParserEnabled**: true *(available in config/dompdf.php)*
- **allowedRemoteHosts**: null *(available in config/dompdf.php)*
- **isFontSubsettingEnabled**: false *(available in config/dompdf.php)*
- **debugPng**: false
- **debugKeepTemp**: false
- **debugCss**: false
- **debugLayout**: false
- **debugLayoutLines**: true
- **debugLayoutBlocks**: true
- **debugLayoutInline**: true
- **debugLayoutPaddingBox**: true
- **pdfBackend**: "CPDF" *(available in config/dompdf.php)*
- **pdflibLicense**: ""
- **adminUsername**: "user"
- **adminPassword**: "password"
- **artifactPathValidation**: null *(available in config/dompdf.php)*

#### Note: Remote access is disabled by default, to provide more security. Use with caution!

[](#note-remote-access-is-disabled-by-default-to-provide-more-security-use-with-caution)

### Tip: UTF-8 support

[](#tip-utf-8-support)

In your templates, set the UTF-8 Metatag:

```

```

### Tip: Page breaks

[](#tip-page-breaks)

You can use the CSS `page-break-before`/`page-break-after` properties to create a new page.

```

.page-break {
    page-break-after: always;
}

Page 1

Page 2

```

### License

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance54

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~31 days

Recently: every ~69 days

Total

10

Last Release

315d ago

### Community

Maintainers

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

---

Top Contributors

[![giorgosstab](https://avatars.githubusercontent.com/u/17095088?v=4)](https://github.com/giorgosstab "giorgosstab (9 commits)")

---

Tags

laraigniterpdfpdf-wrapperpdflaraigniterdompf

### Embed Badge

![Health badge](/badges/lara-igniter-laraigniter-dompdf/health.svg)

```
[![Health](https://phpackages.com/badges/lara-igniter-laraigniter-dompdf/health.svg)](https://phpackages.com/packages/lara-igniter-laraigniter-dompdf)
```

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M278](/packages/barryvdh-laravel-dompdf)[consoletvs/invoices

Generate PDF invoices for your customers in laravel

455275.5k](/packages/consoletvs-invoices)[nucleos/dompdf-bundle

This bundle provides a wrapper for using dompdf inside symfony.

54882.8k1](/packages/nucleos-dompdf-bundle)[dino/dompdf-module

A Zend Framework 2 module for incorporating DOMPDF support.

61465.1k8](/packages/dino-dompdf-module)[phpnt/yii2-export

Yii2 It saves data in xls, csv, word, html, pdf files.

158.9k](/packages/phpnt-yii2-export)

PHPackages © 2026

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