A Laravel wrapper for the Dompdf library to generate PDFs from HTML views, strings, or files.
Laravel DomPDF is a wrapper package that integrates the Dompdf HTML-to-PDF converter into Laravel applications. It allows developers to generate PDF documents from HTML content, Blade views, or files directly within their Laravel projects, streamlining the creation of reports, invoices, and other printable documents.
Laravel developers who need to generate PDF documents from HTML content within their web applications, such as for invoices, reports, or user-facing documents.
It provides a native Laravel experience with facades, service providers, and configuration files, eliminating the need to manually integrate Dompdf. The package also adds features like PDF/A-3b support for archival compliance and embedded XML attachments for electronic invoicing.
A DOMPDF Wrapper for Laravel
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a seamless Laravel experience with service providers, facades, and config files, making PDF generation feel like a built-in feature, as shown in the easy setup with `Pdf::loadView()`.
Supports generating PDFs from HTML strings, files, or Blade views with data binding, allowing developers to use existing templates effortlessly, demonstrated in the README examples.
Enables creation of compliant PDFs with embedded XML for electronic invoicing like Zugferd/Factur-X, detailed in the dedicated section with code snippets for `setPdfA()` and `addEmbeddedFile()`.
Offers multiple output methods (stream, download, save) and per-instance settings like paper size and orientation, with chainable methods for convenience.
For PDF/A compliance, core fonts aren't embedded, requiring manual setup with fonts like DejaVu, which adds overhead and potential licensing issues, as warned in the README.
Relies on Dompdf engine, which can be slow and memory-intensive for large or complex documents, a known limitation not addressed in the wrapper.
Remote resource loading is disabled by default in version 3.x, forcing extra configuration for external images or CSS, which might break existing workflows without careful handling.
Focuses on basic HTML-to-PDF conversion; lacks built-in support for interactive PDF elements or advanced manipulations, relying on Dompdf's capabilities.