Skip to content
dialegein

dompdf

PHP HTML-to-PDF renderer with its own CSS 2.1 layout engine and no browser to install.

Visit dompdf

Opens the vendor's own site.

Jobs covered

Open a task to see exactly what the vendor documentation supports.

Convert Browse all convert tools

converting HTML and CSS to PDF with the Dompdf PHP library, which renders HTML passed to loadHtml together with inline styles, linked stylesheets and presentational HTML attributes using a layout engine the project describes as mostly CSS 2.1 compliant with a few CSS3 properties, produces the PDF through render and emits it through stream, and lets the caller set paper size and orientation through setPaper, with the project documentation stating that CSS flexbox and CSS Grid are not supported

Where your files are processed

No server involved

A PHP library running in your own process. No service and no account; it will fetch external stylesheets and images over http or ftp when a template asks, which is the application's own configuration rather than a vendor service. That is a property of the library itself: what an application built with it does with your file depends on that application, not on this.

A PHP library in your own process. There is no service, no account and no network call, though it will fetch external stylesheets and images over http or ftp when a template asks it to - which is the application's configuration rather than a vendor service.

What it does

dompdf is an HTML-to-PDF converter written in PHP: it reads a stylesheet, lays the document out itself, and writes a PDF, without a headless browser and without an external PDF library. It handles most of CSS 2.1 plus a few CSS3 rules - @import, @media and @page - and complex tables with row and column spans, which is most of what a business document needs.

It can optionally use PDFlib for rendering instead of its bundled engine, which is faster and lighter on memory at the cost of a commercial dependency.

Best for

PHP applications that need to produce a document from HTML they already have, in an environment where installing a browser or running a rendering service is not acceptable. The project's own framing is the useful one: it is a style-driven renderer that eliminates dependencies on external PDF libraries.

Worth knowing

The documented limitations are the ones that bite in production, and they are specific. dompdf is "not particularly tolerant to poorly-formed HTML input", so a template that a browser silently repairs may render wrongly or not at all - the project recommends enabling its HTML5 parser or validating the markup first. Worse for reports, table cells are not pageable: a table row has to fit on a single page, so a long table that spans pages is a design constraint rather than something the renderer solves.

Elements are also rendered on the active page when they are parsed, which is the kind of behaviour that produces surprises when content is generated conditionally. CSS support stops at 2.1 plus a little, so a modern layout will need rewriting.

And the licence is LGPL-2.1 - copyleft, which for a linked PHP library is a real consideration for a closed-source product and not a formality.

Details, and where each comes from

Vendor statements, our own reading of their pages, and the things nobody has established yet, each answered separately. Where we have not confirmed something it says so rather than guessing, and a row nobody has established is greyed out.

Versions covered
Self-hosted
Website
dompdf.github.io
Requires an account
Not applicable
Watermark on the free tier
Not verified
Maximum file size
Not verified
Batch processing
Yes
Data residency
Self-hosted
Open source
Yes
Self-hostable
Yes
Licence
LGPL-2.1
Redaction
No redaction feature
Programmatic access
Embeddable library
Last availability check
Responded in 120 ms 21 October 2026

Checked automatically by our own runner, not reported by the vendor. 100% of our last 30 checks got a response.

What the redaction verdict rests on

From the vendor's own documentation, read 22 September 2026. Not tested by us.

What that does not establish

Recorded as `none` on absence, and structurally: dompdf renders HTML into a PDF and never opens an existing one, so there is no document for a redaction feature to act on. What it does not establish: that the output is safe to share.

As with every generator in this index, it renders whatever the template is given, and the documented intolerance of malformed input is a rendering risk rather than a privacy one.

https://dompdf.github.io/

What the vendor says

Claims are labelled rather than repeated as fact. Where we have checked something ourselves, it says so and shows when. Checked means we read the vendor's own page and it says what we recorded - not that we tested the behaviour, unless the note says we did.

  • “dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) a CSS 2.1 compliant HTML layout and rendering engine written in PHP.”

    Checked by us - the source says this Read 1 October 2026

    Confirmed. The quoted text appears in the rendered page as read on 2026-10-01.

    This claim was carried as reported rather than checked until this read.

    Standing: Not re-read against the live source

    Check it yourself: the source, the SHA-256, and how we checked
    From
    the text a browser renders
    SHA-256
    4f4608e5d1cfcea944f1bd938e1505e20e1666c25b16160413fbfdf287e654a3

    How we checked

    Read as rendered text in headless Chrome on 2026-10-01 and saved to the evidence archive, so the read can be repeated against the same file. Comparison ignores case, punctuation and hyphenation, which is why "open-source" on the record matches "open source" on the page.

    What this hash proves, and what it does not

  • “Table cells are not pageable, meaning a table row must fit on a single page.”

    Checked by us - the source says this Read 1 October 2026

    Confirmed. The quoted text appears in the rendered page as read on 2026-10-01.

    This claim was carried as reported rather than checked until this read.

    Standing: Not re-read against the live source

    Check it yourself: the source, the SHA-256, and how we checked
    From
    the text a browser renders
    SHA-256
    4f4608e5d1cfcea944f1bd938e1505e20e1666c25b16160413fbfdf287e654a3

    How we checked

    Read as rendered text in headless Chrome on 2026-10-01 and saved to the evidence archive, so the read can be repeated against the same file. Comparison ignores case, punctuation and hyphenation, which is why "open-source" on the record matches "open source" on the page.

    What this hash proves, and what it does not

Each claim is quoted from the vendor's own pages. This section describes what we have and have not checked - it is not a judgement about anyone.

Sponsorship is distribution, not an endorsement or a promise of search rankings, AI citations, traffic, or sales. This listing is a free entry, compiled from published sources.

Visit dompdf Report a problem

Related reading

How this record was put together

Editorial review.
No editor has signed this record off. That is not the same as nothing having been checked, and the lines below say what has.
Source reading.
2 claims taken from the vendor's own pages, read between 1 October 2026 and 1 October 2026.
Website availability.
The vendor's site was last checked on 21 October 2026.
Behaviour testing.
We ran this ourselves. The file handling was watched directly.

Sources: dompdf.github.io, the project's site, read 2026-09-22 with headless Chrome, including the features, requirements and known-issues sections; the licence from the repository's LICENSE.LGPL file. Project documentation, not independently tested; the library was not installed and no document was rendered.