PHPackages                             digsolab/dompdf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. digsolab/dompdf

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

digsolab/dompdf
===============

DOMPDF is a CSS 2.1 compliant HTML to PDF converter

v0.6.2(10y ago)05.1kLGPLPHP

Since Feb 7Pushed 10y ago7 watchersCompare

[ Source](https://github.com/Digsolab/dompdf)[ Packagist](https://packagist.org/packages/digsolab/dompdf)[ Docs](https://github.com/digsolab/dompdf)[ RSS](/packages/digsolab-dompdf/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/31a21343b20fbe3865d090f8343934cbc0c4b4ef22d69e7f94400f141b2e6af1/68747470733a2f2f706f7365722e707567782e6f72672f646f6d7064662f646f6d7064662f762f737461626c652e706e67)](https://packagist.org/packages/dompdf/dompdf) [![Total Downloads](https://camo.githubusercontent.com/1b37eb32e163300bb392bd46fea96b5a00919d561ac2f25e4b85707bd3b7b00a/68747470733a2f2f706f7365722e707567782e6f72672f646f6d7064662f646f6d7064662f646f776e6c6f6164732e706e67)](https://packagist.org/packages/dompdf/dompdf) [![Latest Unstable Version](https://camo.githubusercontent.com/90e37ddd4f85515f2b7f35b51962b58d84a16f201b98eff70d0f65e3653f0829/68747470733a2f2f706f7365722e707567782e6f72672f646f6d7064662f646f6d7064662f762f756e737461626c652e706e67)](https://packagist.org/packages/dompdf/dompdf) [![License](https://camo.githubusercontent.com/6043736d50c8077da33e9790154a07c77d8924a3470a9b6580cf1521cc8c1e94/68747470733a2f2f706f7365722e707567782e6f72672f646f6d7064662f646f6d7064662f6c6963656e73652e706e67)](https://packagist.org/packages/dompdf/dompdf)

**dompdf is an HTML to PDF converter**. At its heart, dompdf is (mostly) [CSS 2.1](http://www.w3.org/TR/CSS2/) compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

---

**Check out the [Demo](http://pxd.me/dompdf/www/examples.php) and ask any question on [StackOverflow](http://stackoverflow.com/questions/tagged/dompdf) or on the [Google Groups](http://groups.google.com/group/dompdf)**

---

[![Follow us on Twitter](https://camo.githubusercontent.com/a48223ec1e9d088ad8d71cd6b9a63a3904b3c5f35d63fba3873ca3e55f135eef/687474703a2f2f747769747465722d6261646765732e73332e616d617a6f6e6177732e636f6d2f747769747465722d612e706e67)](http://www.twitter.com/dompdf)[![Follow us on Google+](https://camo.githubusercontent.com/9386b3b649196be21b27a3de3fdefc94b1d5649166e4b8b3821b0047afdf3a2d/68747470733a2f2f73736c2e677374617469632e636f6d2f696d616765732f69636f6e732f67706c75732d33322e706e67)](https://plus.google.com/108710008521858993320?prsrc=3)

Features
========

[](#features)

- handles most CSS 2.1 and a few CSS3 properties, including @import, @media &amp; @page rules
- supports most presentational HTML 4.0 attributes
- supports external stylesheets, either local or through http/ftp (via fopen-wrappers)
- supports complex tables, including row &amp; column spans, separate &amp; collapsed border models, individual cell styling
- image support (gif, png (8, 24 and 32 bit with alpha channel), bmp &amp; jpeg)
- no dependencies on external PDF libraries, thanks to the R&amp;OS PDF class
- inline PHP support

Requirements
============

[](#requirements)

- PHP 5.0+ (5.3+ recommended)
- DOM extension
- GD extension

Recommendations
===============

[](#recommendations)

- MBString extension: provides internationalization support. This extension is *not* enabled by default. dompdf has limited internationalization support when this extension is not enabled.
- opcache (OPcache, XCache, APC, etc.): improves performance

About Fonts &amp; Character Encoding
====================================

[](#about-fonts--character-encoding)

PDF documents internally support the following fonts: Helvetica, Times-Roman, Courier, Zapf-Dingbats, &amp; Symbol. These fonts only support Windows ANSI encoding. In order for a PDF to display characters that are not available in Windows ANSI you must supply an external font. dompdf will embed any referenced font in the PDF so long as it has been pre-loaded or is accessible to dompdf and reference in CSS @font-face rules. See the [font overview](https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding)for more information on how to use fonts.

The [DejaVu TrueType fonts](http://dejavu-fonts.org) have been pre-installed to give dompdf decent Unicode character coverage by default. To use the DejaVu fonts reference the font in your stylesheet, e.g. `body { font-family: DejaVu Sans; }` (for DejaVu Sans).

Easy Installation
=================

[](#easy-installation)

Install with git
----------------

[](#install-with-git)

From the command line switch to the directory where dompdf will reside and run the following commands:

```
git clone https://github.com/dompdf/dompdf.git
git submodule init
git submodule update
```

Install with composer
---------------------

[](#install-with-composer)

To install with Composer, simply add the requirement to your `composer.json`file:

```
{
  "require" : {
    "dompdf/dompdf" : "0.6.*"
  }
}
```

And run Composer to update your dependencies:

```
$ curl -sS http://getcomposer.org/installer | php
$ php composer.phar update
```

Before you can use the Composer installation of DOMPDF in your application you must disable dompdf's default auto-loader, include the Composer autoloader, and load the dompdf configuration file:

```
// somewhere early in your project's loading, require the Composer autoloader
// see: http://getcomposer.org/doc/00-intro.md
require 'vendor/autoload.php';

// disable DOMPDF's internal autoloader if you are using Composer
define('DOMPDF_ENABLE_AUTOLOAD', false);

// include DOMPDF's default configuration
require_once '/path/to/vendor/dompdf/dompdf/dompdf_config.inc.php';
```

Download and install
--------------------

[](#download-and-install)

Download an archive of dompdf and extract it into the directory where dompdf will reside

- You can download stable copies of dompdf from
- Or download a nightly (the latest, unreleased code) from

Limitations (Known Issues)
==========================

[](#limitations-known-issues)

- not particularly tolerant to poorly-formed HTML input. To avoid any unexpected rendering issues you should either enable the built-in HTML5 parser (via the `DOMPDF_ENABLE_HTML5PARSER` configuration constant) or run your HTML through a HTML validator/cleaner (such as Tidy).
- large files or large tables can take a while to render
- CSS float is not supported (but is in the works, enable it through the `DOMPDF_ENABLE_CSS_FLOAT` configuration constant).
- If you find this project useful, please consider making a donation.

(Any funds donated will be used to help further development on this project.) [![Donate button](https://camo.githubusercontent.com/acff8a4af46413276118b9f3b883b373601ac053d9dd5acf8a4e8a944c2538a9/68747470733a2f2f7777772e70617970616c2e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e6174655f534d2e676966)](http://goo.gl/DSvWf)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~234 days

Total

3

Last Release

4006d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad54d65a1e9cce303378cc8f6328e8dda4bba1bbf596910b52d4c8c4ec342619?d=identicon)[scarbo87](/maintainers/scarbo87)

---

Top Contributors

[![PhenX](https://avatars.githubusercontent.com/u/42170?v=4)](https://github.com/PhenX "PhenX (221 commits)")[![bsweeney](https://avatars.githubusercontent.com/u/485897?v=4)](https://github.com/bsweeney "bsweeney (117 commits)")[![flaviencrochard](https://avatars.githubusercontent.com/u/564388?v=4)](https://github.com/flaviencrochard "flaviencrochard (13 commits)")[![amacneil](https://avatars.githubusercontent.com/u/637671?v=4)](https://github.com/amacneil "amacneil (4 commits)")[![zimmski](https://avatars.githubusercontent.com/u/1847950?v=4)](https://github.com/zimmski "zimmski (2 commits)")[![alxndrmlr](https://avatars.githubusercontent.com/u/579553?v=4)](https://github.com/alxndrmlr "alxndrmlr (2 commits)")[![doubleslash](https://avatars.githubusercontent.com/u/1533784?v=4)](https://github.com/doubleslash "doubleslash (2 commits)")[![donatj](https://avatars.githubusercontent.com/u/133747?v=4)](https://github.com/donatj "donatj (1 commits)")[![12hys](https://avatars.githubusercontent.com/u/4165861?v=4)](https://github.com/12hys "12hys (1 commits)")[![eddturtle](https://avatars.githubusercontent.com/u/902607?v=4)](https://github.com/eddturtle "eddturtle (1 commits)")[![CaporalDead](https://avatars.githubusercontent.com/u/1705597?v=4)](https://github.com/CaporalDead "CaporalDead (1 commits)")[![itsgoingd](https://avatars.githubusercontent.com/u/821582?v=4)](https://github.com/itsgoingd "itsgoingd (1 commits)")[![mattleff](https://avatars.githubusercontent.com/u/120155?v=4)](https://github.com/mattleff "mattleff (1 commits)")[![mechjagger](https://avatars.githubusercontent.com/u/470742?v=4)](https://github.com/mechjagger "mechjagger (1 commits)")[![mozmorris](https://avatars.githubusercontent.com/u/156303?v=4)](https://github.com/mozmorris "mozmorris (1 commits)")[![pauln](https://avatars.githubusercontent.com/u/574359?v=4)](https://github.com/pauln "pauln (1 commits)")[![alreece45](https://avatars.githubusercontent.com/u/464982?v=4)](https://github.com/alreece45 "alreece45 (1 commits)")[![richard-uk1](https://avatars.githubusercontent.com/u/1392222?v=4)](https://github.com/richard-uk1 "richard-uk1 (1 commits)")[![vkeranov](https://avatars.githubusercontent.com/u/1285986?v=4)](https://github.com/vkeranov "vkeranov (1 commits)")[![denis-sokolov](https://avatars.githubusercontent.com/u/113721?v=4)](https://github.com/denis-sokolov "denis-sokolov (1 commits)")

### Embed Badge

![Health badge](/badges/digsolab-dompdf/health.svg)

```
[![Health](https://phpackages.com/badges/digsolab-dompdf/health.svg)](https://phpackages.com/packages/digsolab-dompdf)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
