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(5mo ago)77.4k↓68.5%3MITPHPPHP ^8.3CI passing

Since Apr 1Pushed 4mo 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 4d 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

47

—

FairBetter than 93% of packages

Maintenance72

Regular maintenance activity

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

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

172d ago

Major Versions

v0.1.3 → v1.0.02025-04-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/88755?v=4)[MK](/maintainers/kohenkatz)[@kohenkatz](https://github.com/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

1.0k4.8M47](/packages/spatie-laravel-pdf)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

811334.1k3](/packages/defstudio-telegraph)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)

PHPackages © 2026

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