PHPackages                             haska/laravel-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. haska/laravel-pdf

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

haska/laravel-pdf
=================

Laravel Pdf package

3451PHP

Since Sep 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/haskadavid/laravel-pdf)[ Packagist](https://packagist.org/packages/haska/laravel-pdf)[ RSS](/packages/haska-laravel-pdf/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel pdf package
===================

[](#laravel-pdf-package)

Informations
------------

[](#informations)

Provider:

```
'Haska\Pdf\PdfServiceProvider',
```

Alias:

```
'PDF' => 'Haska\Pdf\Facade',
```

Config:

```
php artisan config:publish haska/laravel-pdf
```

DOMPDF Wrapper for Laravel 4
----------------------------

[](#dompdf-wrapper-for-laravel-4)

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.

```
$pdf = App::make('dompdf');
$pdf->loadHTML('Test');
return $pdf->stream();

```

Or use the facade:

```
$pdf = PDF::loadView('pdf.invoice', $data);
return $pdf->download('invoice.pdf');

```

You can chain the methods:

```
return PDF::loadFile(public_path().'/myfile.html')->save('/path-to/my_stored_file.pdf')->stream('download.pdf');

```

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

```
PDF::loadHTML($html)->setPaper('a4')->setOrientation('landscape')->setWarnings(false)->save('myfile.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.

### Tip: UTF-8 support

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

In your templates, set the UTF-8 Metatag:

```

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c352a3ff067ddeaa19a4825a48044ba5f2932a77ae3455e3f765c034b569451?d=identicon)[haska](/maintainers/haska)

### Embed Badge

![Health badge](/badges/haska-laravel-pdf/health.svg)

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

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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