gotenberg/gotenberg-php
PHP client for the Gotenberg API to convert documents to PDF using Chromium/LibreOffice. Build requests for URL, HTML, Markdown, and Office files, then stream or save outputs. Compatible with Gotenberg 8.x via client v2.x.
Document Generation & Conversion Roadmap
Build vs. Buy Decision
Key Use Cases
Architectural Fit
waitForSelector, emulatedMediaFeatures)."Gotenberg + This PHP Client = A Scalable, Cost-Effective PDF Engine for [Product Name]."
"Replace Your PDF Hacks with a Battle-Tested, Extensible API."
Why This Over Alternatives?
| Feature | Gotenberg + PHP Client | wkhtmltopdf | Adobe API | Custom Scripts |
|---|---|---|---|---|
| HTML → PDF | ✅ (Chromium) | ✅ | ✅ | ❌ (flaky) |
| Office Docs | ✅ (LibreOffice) | ❌ | ❌ | ❌ |
| Factur-X | ✅ (New in v2.23) | ❌ | ❌ | ❌ |
| Watermarks/Stamps | ✅ | ❌ | ✅ | ❌ |
| Encryption | ✅ | ❌ | ✅ | ❌ |
| Self-Hosted | ✅ | ✅ | ❌ | ✅ |
| Scalability | ✅ (Docker) | ❌ (Binary) | ✅ | ❌ |
| Debugging | ✅ (Correlation IDs) | ❌ | ✅ | ❌ |
Key Benefits:
Implementation Plan:
Dependencies:
gotenberg/gotenberg-php and php-http/guzzle7-adapter to composer.json.Migration Path:
Gotenberg::chromium()->pdf()->url().Gotenberg::libreOffice()->convert(Stream::path($docx))).Call to Action: "Let’s prototype this in 2 sprints—if it doesn’t outperform our current solution, we’ll pivot. But given the features and maintenance, this is a no-brainer for [Product Goal]."
How can I help you explore Laravel packages today?