Weave Code
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

Gotenberg Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Document Generation as a Core Feature:

    • Enable PDF/screenshot generation from URLs, HTML, Markdown, or Office files (e.g., invoices, reports, contracts) without third-party SaaS dependencies.
    • Reduce reliance on external APIs (e.g., Adobe Acrobat, Puppeteer) by leveraging Gotenberg (self-hosted, Chromium/LibreOffice-based).
  • Roadmap Priorities:

    • Compliance/Regulatory Use Cases: Generate Factur-X-compliant PDFs (e.g., EU invoicing standards) via custom metadata support.
    • Dynamic Content Delivery: Stream PDFs/screenshots on-demand (e.g., real-time report generation for dashboards).
    • Asset Optimization: Automate screenshot generation for A/B testing, visual regression testing, or preview features.
  • Build vs. Buy:

    • Build: Justify self-hosted Gotenberg over cloud services (cost control, data sovereignty, no vendor lock-in).
    • Buy: Integrate with existing Symfony ecosystems (e.g., API Platform, Mercure) without reinventing PDF logic.
  • Use Cases:

    • B2B SaaS: Automate invoice/statement generation (e.g., "Download PDF" button).
    • E-Commerce: Generate receipts or product catalogs from templates.
    • Internal Tools: Convert internal docs (Confluence/Notion exports) to PDFs for archival.
    • Accessibility: Ensure dynamic content (e.g., web apps) is PDF-exportable for screen readers.

When to Consider This Package

Adopt If:

  • Your stack is Symfony 6.4+ (or PHP 8.2+) with Docker (for Gotenberg deployment).
  • You need headless PDF/screenshot generation with Chromium/LibreOffice (no browser automation libraries like Playwright).
  • Your use case requires self-hosted solutions (e.g., GDPR compliance, offline processing).
  • You’re already using Symfony Flex (simplifies bundle integration).
  • You need Twig integration (e.g., dynamic PDFs from templates with {{ gotenberg_asset() }}).
  • Advanced features are critical:
    • PDF Manipulation: Merge, split, encrypt, or flatten PDFs.
    • Office Docs: Convert .docx, .xlsx, or .pptx to PDF.
    • Webhooks: Async processing for long-running tasks.
    • Factur-X: Compliance for European invoicing.

Look Elsewhere If:

  • You need serverless or managed solutions (e.g., AWS Lambda + Puppeteer).
  • Your team lacks Docker/Kubernetes expertise (Gotenberg requires containerization).
  • You prioritize cost over control (cloud services like PDF.co or CloudConvert may be cheaper).
  • You’re not using Symfony (package is tightly coupled; alternatives like snappy or dompdf exist for other frameworks).
  • You need real-time rendering (e.g., interactive forms in PDFs; Gotenberg is static).
  • Your use case involves non-standard file types (e.g., CAD files; Gotenberg supports limited formats).

How to Pitch It (Stakeholders)

For Executives:

*"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."*

For Engineers:

*"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."*

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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky