A CSS 2.1 compliant HTML to PDF rendering engine written in PHP, supporting external stylesheets, images, and complex tables.
Dompdf is a PHP-based HTML to PDF converter that functions as a style-driven rendering engine. It enables developers to generate PDF documents directly from HTML and CSS, making it a valuable tool for creating dynamic reports, invoices, and printable content within PHP applications.
PHP developers who need to generate PDFs from HTML and CSS within their applications, such as those building content management systems, e-commerce platforms, or reporting tools.
Developers choose Dompdf because it is a self-contained library with no external PDF dependencies, offers good CSS 2.1 compliance and HTML support, and allows embedding PHP for dynamic content generation directly in the HTML.
HTML to PDF converter for PHP
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses the built-in R&OS PDF class with no external PDF library dependencies, simplifying deployment and reducing compatibility issues.
Handles most CSS 2.1 properties and HTML 4.0 attributes, including complex tables and external stylesheets, for web-standard based rendering.
Embeds referenced fonts and includes pre-loaded DejaVu fonts, providing solid Unicode character coverage without extra configuration.
Allows embedding PHP code within HTML for real-time dynamic content generation, enabling data-driven PDFs like invoices.
Has community-maintained bundles for Laravel and Symfony, streamlining integration into popular PHP projects.
Lacks support for CSS flexbox and CSS Grid, limiting its use for contemporary, responsive web layouts as admitted in the limitations.
Table cells are not pageable, meaning rows cannot split across pages, which can break large tables in PDFs, a known unresolved issue.
Requires enabling 'isRemoteEnabled' and configuring 'chroot' for local files, adding setup overhead for external resources.
Does not support embedding raw SVG directly; forces workarounds like external files or Data URIs, complicating SVG-heavy documents.