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

Gotenberg Pdf Bundle Laravel Package

rekalogika/gotenberg-pdf-bundle

A Symfony bundle that integrates Gotenberg, the Docker-powered PDF generation service, into your PHP app. Generate PDFs from HTML, URLs, or Markdown through a simple service or Twig, with configurable hosts, timeouts, and assets. Simplifies PDF creation without managing headless browsers yourself.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • PDF export as a roadmap feature: invoices, statements, contracts, receipts, compliance reports, certificates, and customer-facing document exports. This package is the integration layer between your application and a Gotenberg service, so the real product decision is "how do we render documents?" rather than "should we install this bundle?"
  • Build vs. buy for document rendering: Gotenberg (and by extension this bundle) lets you keep templates in HTML/CSS — owned by your team, versioned in your repo — while offloading the expensive, fragile rendering engine (headless Chromium for HTML, LibreOffice for DOCX/XLSX/PPTX) to a containerized service. That is a meaningfully different cost/ownership profile than a per-document SaaS API (DocRaptor, PDFShift, Api2Pdf) or a pure-PHP renderer (DomPDF, Snappy/wkhtmltopdf).
  • Fidelity-driven product scope: if the roadmap includes CSS Grid/Flexbox layouts, web fonts, page headers/footers with page numbers, PDF/A output, or "upload a Word doc, download a PDF" flows, this is the class of tool that unlocks those without a design rewrite. DomPDF-class libraries typically force you into simplified layouts and produce visible fidelity regressions that customers notice on invoices and branded documents.
  • Self-hosting / data-residency decisions: because Gotenberg runs in your own infrastructure, this supports product commitments around PII never leaving your environment — relevant for finance, healthcare, legal, and EU data-residency positioning.
  • Cost modeling at volume: a self-hosted rendering service has a near-flat marginal cost per document once the container is provisioned, which changes the economics of high-volume or bursty document generation (month-end statement runs, bulk report exports) versus per-document pricing.
  • Architecture decision: whether PDF generation is synchronous (blocking a request) or asynchronous (queued job + notification/email). A remote rendering service naturally pushes you toward the async pattern, which is usually the better product behavior for anything larger than a single page.

Important caveat for a Laravel team: the package description explicitly identifies this as a Symfony Bundle. In a Laravel codebase it is not a drop-in; adopting it means either standing up a Symfony kernel alongside Laravel (unusual and hard to justify) or, far more likely, using it as a reference implementation and calling the Gotenberg HTTP API directly — or via a framework-agnostic client such as gotenberg/gotenberg-php. Treat the "adopt this package" decision and the "adopt Gotenberg" decision as two separate decisions, and be honest that only the second one is likely to be a yes.

When to Consider This Package

Consider it when:

  • The application is Symfony-based (or you maintain a Symfony service specifically for document rendering) and you want DI-configured, framework-idiomatic access to a Gotenberg instance rather than hand-rolling HTTP calls.
  • You need Chromium-grade HTML/CSS rendering — complex layouts, modern CSS, custom fonts, precise pagination — or need to convert Office documents (DOCX, XLSX, PPTX) to PDF, which Gotenberg handles via LibreOffice.
  • You are willing and able to operate a Docker service in your infrastructure, including scaling it, monitoring it, and handling its failure modes.
  • Data residency or compliance requires documents to be rendered inside your own network.
  • Volume or cost makes per-document SaaS pricing unattractive, or you want to avoid a hard dependency on a third-party rendering vendor.
  • You want templates owned as code (HTML/CSS in your repo, reviewed in PRs) rather than locked inside a vendor's template editor.

Look elsewhere when:

  • You are on Laravel and want a native developer experience — prefer the Gotenberg HTTP API directly or gotenberg/gotenberg-php; do not adopt a Symfony bundle into a Laravel app just to avoid writing a small HTTP client.
  • Your documents are simple, low-fidelity, and low-volume — a plain HTML-to-PDF PHP library (DomPDF, Snappy) is fewer moving parts and no extra service to operate.
  • You have no appetite for running containerized infrastructure or need a vendor SLA — a managed API is the lower-risk call, and the per-document cost is the price of not owning operations.
  • You need PDF editing, form filling, annotation, digital signatures, or PDF manipulation — Gotenberg converts documents; it is not a PDF toolkit. Pair it with a library like FPDI/TCPDF or a dedicated signing service.
  • Community maturity is a hard requirement. At roughly 11 stars this is an early-stage, low-adoption package with a single-maintainer risk profile. If you adopt it, budget for the possibility of forking or replacing the thin wrapper — which is another argument for calling the HTTP API directly, since the wrapper is not where your value lives.
  • You need guaranteed long-term support, security patching commitments, or a commercial entity behind the code. MIT licensing gives you legal freedom but no support obligation.

How to Pitch It (Stakeholders)

For executives (30 seconds): We need to generate customer-facing PDFs — invoices, statements, reports. Today the realistic options are a per-document SaaS API, a PHP-only renderer with quality compromises, or a self-hosted rendering service. Gotenberg is an open-source (MIT) rendering service we run ourselves; this package is a small Symfony integration layer for it. The strategic argument is cost control and vendor independence: near-flat marginal cost per document at volume, no per-document fees, and customer documents never leave our infrastructure — which matters for compliance and for our data-residency story. The trade-offs are honest ones: we take on operating a containerized service, and the integration layer itself is a low-adoption open-source project (about a dozen GitHub stars), so we should treat it as replaceable glue rather than a strategic dependency. Recommendation: evaluate Gotenberg on its merits; do not treat this specific bundle as the decision.

For engineering: This is a thin Symfony bundle over the Gotenberg HTTP API — it wires configuration and service definitions so you can inject a PDF generator instead of writing an HTTP client. The value is in Gotenberg itself: headless Chromium for HTML/CSS and LibreOffice for Office formats, running as a separate container, which means rendering load and Chromium's memory footprint stay out of the PHP process. Two things to flag. First, this is a Symfony bundle, not a Laravel package — in our Laravel codebase the right move is to call the Gotenberg API directly or use gotenberg/gotenberg-php; the bundle is useful mainly as a reference for configuration shape and route conventions. Second, at ~11 stars it is early-stage; assume we own the integration code. Budget for: a Docker service in every environment, queue-based async generation for anything non-trivial, request timeouts and retry/idempotency handling, template versioning in-repo, and a golden-file test suite so template changes don't silently break invoice layout. If we go this route, the integration surface is small enough that this is a days-not-weeks decision — worth a short spike to validate fidelity against our two hardest templates before committing.

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.
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
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console