mpdf/mpdf
PHP library generating PDF files from UTF-8 encoded HTML observed · 2026-08-28
Health v2 · maintenance only
62/100
- Activity 87
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4201
- days_rel: n/a
- days_push: 83
- n_releases_24m: 0
Adoption not part of the score
4700 stars · 1110 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
mPDF is a PHP library that generates PDF documents from UTF-8 encoded HTML, based on FPDF and HTML2FPDF with extensive enhancements. It supports CSS styling, CJK and other Unicode scripts, barcodes, headers/footers, page numbering, and tables of contents.
Use cases
- generate pdf invoices from html templates in php
- convert utf-8 html to pdf with cjk font support
- create pdf documents with headers footers and page numbers in php
- generate pdfs with barcodes and table of contents
- produce printable pdf reports from a php web app
When to choose
- you need pure-PHP PDF generation without external binaries
- you need Unicode/CJK text, barcodes, TOCs, or page numbering
- you control the HTML/CSS templates and can tailor them for mPDF
When to avoid
- you need state-of-the-art CSS support or pixel-perfect mirroring of existing web pages (use headless Chrome)
- you plan to pass unsanitized user-supplied HTML/CSS directly into the library
- you need a modern, actively evolving CSS engine
Facets
library · maturity maintenance
pdf templating pdf web-development files php cli html-to-pdf utf-8 cjk css composer fpdf web-server
2 sources
- readme: https://github.com/mpdf/mpdf · fetched 2026-08-28 · 18fd88b5450a
- homepage: https://mpdf.github.io · fetched 2026-08-29 · 1e3c3d767c08
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mpdf/mpdf | main | 62 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem