obtao/html2pdf-bundle
ObtaoHtml2pdfBundle brings HTML-to-PDF conversion to Symfony apps, letting you render templates or raw HTML as PDF documents through a simple service. Configure it once and reuse it across controllers and commands.
spipu/html2pdf or a modern equivalent), or buy a rendering service. The package itself resolves this quickly: it is a Symfony2 wrapper with no Laravel surface, so the real decision is which engine backs the PDF feature, not whether to install this bundle.PdfRenderer-style interface so any PDF engine (dompdf, Snappy/wkhtmltopdf, Browsershot/Chromium, Gotenberg service) can be swapped without touching feature code. This is the durable product decision the package motivates.Consider it only as reference material, not a dependency:
HTML2PDF factory).spipu/html2pdf (or an alternative engine) wrapped in ~40 lines of your own code.Look elsewhere, or reject outright, when:
To executives: This package is not a strategic dependency and should not appear on the roadmap as one. It is a small MIT-licensed Symfony2 convenience wrapper around an older HTML-to-PDF engine, with 2 stars and no dependents. Its only real value is as a reference for how a PDF-export feature is shaped — templates in, PDF out. If PDF generation (invoices, statements, exports) is on the roadmap, treat this as a sizing artifact and budget a short spike to evaluate a maintained engine or a managed rendering service instead. The recommended product decision: do not adopt; standardize on an owned, swappable PDF pipeline.
To engineering: Do not composer require this in a Laravel app. Port the behavior, not the code. Read its configuration tree and service factory, then rebuild the equivalent as a Laravel service provider bound to an interface (PdfRenderer) with a config/pdf.php for orientation, format, margins, and fonts. Pick the engine on fidelity and operational fit — dompdf for simple documents, Snappy/wkhtmltopdf for richer layouts, Browsershot/Chromium or Gotenberg for high-fidelity or isolated rendering. Whatever you choose, keep the contract stable (HTML/Blade in, binary or stored file out) and add contract tests on page count, text extraction, and font rendering before cutover.
To the team running legacy: If a Symfony2 system still uses this bundle, isolate it behind the same interface, capture its templates and config, and plan extract-and-replace rather than port-and-maintain. The bundle's value is the wiring pattern, which you can reproduce in a few dozen lines.
How can I help you explore Laravel packages today?