# Dompdf

HTML to PDF converter for PHP

Repository: https://github.com/dompdf/dompdf
Canonical: https://ross.abutalabs.com/products/dompdf
Homepage: https://dompdf.github.io/
Language: PHP
License: LGPL-2.1
License Family: copyleft
Topics: dompdf, php, font, html, css, html-to-pdf, pdf-generation
Last push: 2026-08-02T14:42:25+00:00
Link (homepage): https://dompdf.github.io/

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 93, longevity 100
- inputs: {"age_days": 5042, "days_push": 31, "days_rel": 44, "gap_med": 23.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 11177, forks 1838 (observed 2026-08-28T04:10:46.307049+00:00)

## What it is
Dompdf is an HTML to PDF converter implemented as a PHP library, functioning as a mostly CSS 2.1-compliant HTML layout and rendering engine. It renders HTML documents with stylesheets, images, tables, and basic SVG into PDF files without requiring external PDF libraries.

## Use cases
- generate pdf invoices from html templates in php
- convert html reports to pdf documents
- render styled html with css into downloadable pdfs
- create pdf documents server-side with php
- generate pdf receipts from web application data
- embed custom fonts in generated pdf files

## When to choose
- you need to generate PDFs from HTML/CSS in a PHP application
- you want a pure-PHP solution with no external PDF binary dependencies
- your documents use CSS 2.1 layout, tables, and images
- you need Unicode support via embedded TrueType fonts

## When to avoid
- you need pixel-perfect rendering of modern CSS3 or JavaScript-driven pages
- your HTML input is poorly formed, since dompdf is not tolerant of invalid markup
- you need very high performance or low memory usage for large documents
- you are not working in PHP

## Facets
- artifact type: library
- maturity: stable
- function: pdf, templating, parser
- domain: pdf, web-development, backend
- platform: php, cross-platform
- tags: html-to-pdf, css-rendering, pdf-generation, php-library, web-server

## Member repositories
- dompdf/dompdf (main) score 95
- dompdf/php-font-lib (backend) score 60
- dompdf/php-svg-lib (backend) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:46.307049+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:16:43.253042+00:00, confidence not recorded.
  - readme: https://github.com/dompdf/dompdf (fetched 2026-08-28T04:10:46.307049+00:00, sha 0738a4ef19f7)
  - homepage: https://dompdf.github.io/ (fetched 2026-08-29T08:15:08.765966+00:00, sha c85873b6ea47)
- Data as of 2026-08-30T08:39:29.467469+00:00.
