PHPackages                             safermobility/laravel-gotenberg - 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. safermobility/laravel-gotenberg

Abandoned → [spatie/laravel-pdf](/?search=spatie%2Flaravel-pdf)ArchivedLibrary[PDF &amp; Document Generation](/categories/documents)

safermobility/laravel-gotenberg
===============================

Create PDFs in Laravel apps using Gotenberg

v1.0.3(4mo ago)65.3k↓18.4%3MITPHPPHP ^8.3CI passing

Since Apr 1Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/safermobility/laravel-gotenberg)[ Packagist](https://packagist.org/packages/safermobility/laravel-gotenberg)[ Docs](https://github.com/safermobility/laravel-gotenberg)[ RSS](/packages/safermobility-laravel-gotenberg/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (13)Versions (9)Used By (0)

Create PDFs in Laravel apps using Gotenberg
===========================================

[](#create-pdfs-in-laravel-apps-using-gotenberg)

IMPORTANT!
----------

[](#important)

**This package is no longer maintained, because [`spatie/laravel-pdf`](https://github.com/spatie/laravel-pdf) now has support for Gotenberg in 2.1+.**

---

Overview
--------

[](#overview)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8a41631e1f6a1107dde654c3c984dcc69d45b16193d2ff112817cd495ec5388a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616665726d6f62696c6974792f6c61726176656c2d676f74656e626572672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/safermobility/laravel-gotenberg)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a9f37f352c28298b1898e180d598b846cd72588b274e291d2f1e8ebf52752682/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616665726d6f62696c6974792f6c61726176656c2d676f74656e626572672f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/safermobility/laravel-gotenberg/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/fae6f9c7eef197e6acaf4467b892230fe974c789dd59aabed19d15fdce634c49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616665726d6f62696c6974792f6c61726176656c2d676f74656e626572672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/safermobility/laravel-gotenberg/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c0420f296b79ea486242a19a7a9dab5451e6dc3e29f3f399e3d8db34bd00ed20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616665726d6f62696c6974792f6c61726176656c2d676f74656e626572672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/safermobility/laravel-gotenberg)

This package provides a simple way to create PDFs in Laravel apps. Under the hood it uses [Gotenberg](https://gotenberg.dev) to generate PDFs from Blade views. You can use modern CSS features like grid and flexbox to create beautiful PDFs.

This package is very heavily based on Spatie's [laravel-pdf](https://github.com/spatie/laravel-pdf) package, but does not require Node.js to run, making it more suitable for applications that run in containers.

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

[](#installation)

You can install the package via composer:

```
composer require safermobility/laravel-gotenberg
```

You can publish the config file with:

```
php artisan vendor:publish --tag="gotenberg-config"
```

This is the contents of the published config file:

```
return [
    'host' => env('GOTENBERG_HOST'),
];
```

Usage
-----

[](#usage)

You must have a working Gotenberg instance.

For development, you may be able to use the Gotenberg Demo server:

```
GOTENBERG_HOST=https://demo.gotenberg.dev
```

For production, you must set up your own Gotenberg instance.

### Simple PDF generation

[](#simple-pdf-generation)

```
use SaferMobility\LaravelGotenberg\Facades\Gotenberg;

Gotenberg::view('pdfs.invoice', ['invoice' => $invoice])
    ->format('letter')
    ->save('invoice.pdf')
```

This will render the Blade view `pdfs.invoice` with the given data and save it as a PDF file.

You can also return the PDF as a response from your controller:

```
use SaferMobility\LaravelGotenberg\Facades\Gotenberg;

class DownloadInvoiceController
{
    public function __invoke(Invoice $invoice)
    {
        return Gotenberg::view('pdfs.invoice', ['invoice' => $invoice])
            ->format('letter')
            ->name('your-invoice.pdf');
    }
}
```

This will use a streamed response to reduce memory usage.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [SaferMobility](https://github.com/safermobility)
- [Spatie](https://github.com/spatie) - for their Laravel PDF package, and many others

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance80

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65% 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 ~41 days

Recently: every ~72 days

Total

8

Last Release

125d ago

Major Versions

v0.1.3 → v1.0.02025-04-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/0759b5eeafda005bac38df0e39cab4d3c6ec4cedebe9008b5df2cafccb8651ef?d=identicon)[kohenkatz](/maintainers/kohenkatz)

---

Top Contributors

[![kohenkatz](https://avatars.githubusercontent.com/u/88755?v=4)](https://github.com/kohenkatz "kohenkatz (26 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![ogmdev](https://avatars.githubusercontent.com/u/10164678?v=4)](https://github.com/ogmdev "ogmdev (3 commits)")[![ematrito](https://avatars.githubusercontent.com/u/129194906?v=4)](https://github.com/ematrito "ematrito (1 commits)")

---

Tags

laravelGotenbergSaferMobilitylaravel-gotenberg

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/safermobility-laravel-gotenberg/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

9963.4M12](/packages/spatie-laravel-pdf)[spatie/laravel-site-search

A site search engine

300129.1k](/packages/spatie-laravel-site-search)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)

PHPackages © 2026

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