# spipu/html2pdf

OFFICIAL PROJECT | HTML to PDF converter written in PHP

Repository: https://github.com/spipu/html2pdf
Canonical: https://ross.abutalabs.com/products/html2pdf
Homepage: http://html2pdf.fr/en/default
Language: PHP
License: OSL-3.0
License Family: other
Topics: php, html2pdf
Last push: 2025-06-08T21:51:52+00:00

## Health v2 (maintenance only)
Score: 41/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 25, release rhythm 28, longevity 100
- inputs: {"age_days": 4244, "days_push": 451, "days_rel": 451, "gap_med": 49, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1769, forks 738 (observed 2026-08-28T04:05:33.797770+00:00)

## What it is
Html2Pdf is a PHP library that converts specially prepared HTML markup into PDF documents, built on top of TCPDF. It is designed for generating documents like invoices and delivery notes from clean, purpose-written HTML rather than converting arbitrary web pages.

## Use cases
- generate pdf invoices from html templates in php
- create pdf delivery notes from a web application
- convert cleaned html markup to pdf documents
- generate official pdf documents server-side with php
- produce pdf documentation from html

## When to choose
- you are building a PHP application and need server-side PDF generation
- you can write clean, purpose-built HTML for your PDF layout
- you need table-heavy documents like invoices or delivery notes
- you want a Composer-installable library built on TCPDF

## When to avoid
- you need to convert arbitrary existing web pages or WYSIWYG HTML output faithfully
- you need full modern HTML/CSS support including all tags
- you are not working in PHP

## Facets
- artifact type: library
- maturity: active
- function: pdf, templating
- domain: pdf, web-development, backend
- platform: php
- tags: html-to-pdf, tcpdf, invoice-generation, document-generation, composer

## Member repositories
- spipu/html2pdf (main) score 41

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:33.797770+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-30T03:26:07.794826+00:00, confidence not recorded.
  - readme: https://github.com/spipu/html2pdf (fetched 2026-08-28T04:05:33.797770+00:00, sha 7fb2ee45869a)
  - homepage: http://html2pdf.fr/en/default (fetched 2026-08-29T11:04:34.438996+00:00, sha 071845e449cb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
