gotenberg/gotenberg-php
A PHP client for the Gotenberg API, letting you convert HTML, Markdown, Word, Excel, and URLs into PDFs using Chromium and LibreOffice, with a simple, framework-agnostic interface.
Feature enablement (ship faster, not build infra):
.docx, .xlsx, .pptx, .odt, or .md and receive a normalized PDF for preview, archival, e-signature, or compliance storage.Build vs. buy:
Roadmap signals:
Risk/decision inputs:
->url(). This is a product-surface decision (which URLs are user-supplied?) and needs a security review before launch, not after.Adopt when:
Look elsewhere when:
Adoption checklist before committing:
composer.json and your Dockerfile; upgrade as a pair.->url(), downloadFrom()), including allow-lists and egress controls.For executives (30 seconds):
We need PDF generation for invoices, exports, and customer document uploads. The alternative is building and operating our own headless-browser conversion service — weeks of engineering plus permanent infrastructure and security ownership. This package is a small, MIT-licensed PHP client over Gotenberg, a mature open-source conversion service we run inside our own infrastructure. It gets us document generation in days instead of months, keeps customer documents on our own systems (no new third-party data processor), and supports the archival PDF/A format that regulated customers ask for. Cost is a container we already know how to run; the trade-off is that we own its operation and its upgrade cycle.
For engineering:
multipart/form-data, returning PSR-7 requests executed through any PSR-18 client. No framework lock-in, no custom transport, no magic.chromium, libreOffice, pdfEngines) and kept in lockstep with the Gotenberg server — new server features arrive as typed methods (pdfa(), pdfua(), split(), generateDocumentOutline(), downloadFrom()).Gotenberg::send() throws GotenbergApiErrored on non-2xx, Gotenberg::save() writes to disk and returns the filename, and correlation IDs propagate via Gotenberg-Trace for tracing across our logs and Gotenberg's.Framing the trade-off honestly: we are not buying a service, we are adopting a self-hosted one. The win is control, cost, and data residency; the price is operating a container and owning its upgrade cadence. For a product where documents are core and customer data is sensitive, that's the right trade — and if it ever isn't, the client is thin enough to replace without rewriting the features built on it.
How can I help you explore Laravel packages today?