Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Gotenberg

Laravel Gotenberg Laravel Package

safermobility/laravel-gotenberg

A Laravel wrapper for Gotenberg that simplifies generating PDFs from HTML, URLs, Markdown, and Office documents. It offers a fluent, configurable API for sending content to your Gotenberg service and returning polished PDF output.

View on GitHub
Deep Wiki
Context7

Create PDFs in Laravel using Gotenberg

Frequently asked questions about Laravel Gotenberg
How do I install and configure safermobility/laravel-gotenberg in a Laravel app?
Install it with Composer using composer require safermobility/laravel-gotenberg, then publish the package configuration and point the client at your Gotenberg base URL. The service provider registers the client automatically, so application code can resolve it from the container or inject it. Store the returned PDF bytes to a configured filesystem disk, and pin ^1.0.3 or later so the local-filesystem saving fix is present.
Which Laravel and PHP versions does laravel-gotenberg support?
The package's release notes in this assessment do not include a validated Laravel or PHP version matrix. Check the composer.json constraints and the README on the repository before adopting it, and confirm the supported range matches your target applications. If you run older Laravel releases, verify compatibility in a staging branch before rollout.
Do I need a running Gotenberg server or Docker container to use this package?
Yes. This is a thin Laravel wrapper around a Gotenberg HTTP service, so PDF rendering happens in Gotenberg, not inside your Laravel process. You need a reachable Gotenberg instance, typically a sidecar or separate container in Docker or Kubernetes. It is a poor fit for serverless or single-container deployments that cannot host or reach Gotenberg.
How do I save a generated PDF to local storage with laravel-gotenberg?
Generate the PDF through the package client and write the returned bytes to a configured disk, such as storage/app or a shared volume in your deployment. The v1.0.3 patch specifically fixed saving the PDF to the local filesystem, so earlier 1.0.x releases may have mis-persisted output. After upgrading, verify directory permissions and disk configuration, and add a regression test around the file write.
Which Gotenberg versions are compatible with this Laravel package?
Compatibility with specific Gotenberg image and API versions is not documented in the release notes reviewed here. Because the client is coupled to the Gotenberg HTTP API, validate your chosen Gotenberg image against the package in a staging environment before relying on it in production. Pin both the package version and the Gotenberg image tag so upgrades are deliberate.
How do I generate a PDF from an HTML string or a URL using laravel-gotenberg?
The package provides a fluent API for sending content to Gotenberg and receiving PDF output, covering HTML, URLs, Markdown, and Office documents. You build the request through the client, pass your content, and store the returned bytes wherever your application needs them. Because Chromium handles rendering inside Gotenberg, CSS and JavaScript support differs from in-process libraries, so test representative documents for visual fidelity.
What changed in laravel-gotenberg v1.0.3 and should I upgrade?
v1.0.3 fixes saving the PDF to the local filesystem, which implies a real production failure mode existed where output was not saved or was saved incorrectly. Teams writing generated PDFs to a local disk should treat v1.0.3 as the minimum acceptable patch level. The other changes in that release are CI and tooling dependency bumps and do not affect runtime behavior.
Can laravel-gotenberg convert Word or Office documents to PDF?
Yes, the package advertises PDF generation from Office documents as well as HTML, URLs, and Markdown by delegating conversion to Gotenberg. Gotenberg handles the document conversion, so results depend on its LibreOffice-based pipeline and the fonts available in that container. Test a sample of real business documents before committing to it for Office conversion workloads.
Does laravel-gotenberg handle timeouts, retries, and errors for production use?
The release notes reviewed here do not confirm whether the client exposes timeouts, retries, or meaningful exceptions for operational monitoring. Since every PDF request is a network hop to Gotenberg, you should verify this behavior yourself and wrap calls with your own timeout and error handling if needed. Add monitoring around failures so a slow or unavailable Gotenberg instance does not silently break document generation.
What are the alternatives to laravel-gotenberg for PDF generation in Laravel?
Alternatives include in-process libraries such as DomPDF and Snappy with wkhtmltopdf, or calling the Gotenberg HTTP API directly with your own wrapper. Migrating from ad-hoc cURL calls is mostly mechanical, but migrating from a different rendering library is larger because CSS and JavaScript support will differ. The trade-off is that in-process rendering avoids an external service dependency, while Gotenberg gives better Chromium-based fidelity.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core