sensiolabs/gotenberg-bundle
Symfony bundle to generate PDFs and screenshots via the Gotenberg API. Convert from URL, HTML, Markdown, or Office files, then stream or save outputs locally. Supports source-specific options, advanced usage, and profiler/testing integrations.
Document Generation as a Core Feature:
Roadmap Priorities:
Build vs. Buy:
Use Cases:
{{ gotenberg_asset() }})..docx, .xlsx, or .pptx to PDF.snappy or dompdf exist for other frameworks).*"This bundle lets us own our PDF generation infrastructure—no more relying on third-party APIs or SaaS costs. By integrating Gotenberg (a self-hosted, Chromium/LibreOffice-based service) with Symfony, we can:
- Reduce vendor lock-in: Generate invoices, reports, or receipts without external dependencies.
- Cut costs: Avoid per-request fees from cloud services (e.g., $0.01/PDF → $0/PDF after setup).
- Comply effortlessly: Support Factur-X for EU invoicing or accessibility via dynamic PDF exports.
- Scale reliably: Dockerized Gotenberg handles load spikes (e.g., end-of-month reports).
- Future-proof: Add features like webhooks for async processing or OCR later if needed.
Risk: Initial setup requires Docker, but we’ll offset this with long-term savings and data control."*
*"This is a batteries-included solution for PDF/screenshot generation in Symfony:
- Zero reinvention: Leverages Gotenberg’s API (Chromium + LibreOffice) under the hood.
- Twig-native: Generate PDFs from templates with
{{ gotenberg_asset() }}for assets.- Flexible inputs: Convert URLs, HTML, Markdown, or Office files (
.docx,.xlsx, etc.).- Advanced PDF ops: Merge, split, encrypt, or flatten PDFs—no external tools needed.
- Dev-friendly: Built-in profiler, testing helpers, and Docker support (Symfony Flex auto-configures it).
- Async-ready: Webhooks for long-running tasks (e.g., large report generation).
Tradeoffs:
- Requires Docker (but we can containerize Gotenberg alongside our app).
- Not real-time (e.g., no interactive forms in PDFs).
- Limited to Symfony (but worth it for the integration).
Quick win: Replace manual PDF exports in [X feature] with a single
->stream()call."*
How can I help you explore Laravel packages today?