Dompdf is a PHP Library to convert HTML pages to PDF

Dompdf is a PHP Library to convert HTML pages to PDF
Photo by Mohammad Rahmani / Unsplash

dompdf is a PHP-based HTML to PDF converter that is mostly CSS 2.1 compliant. It supports external stylesheets, inline styles, and presentational HTML attributes. PDF rendering can be done using PDFLib or the bundled R&OS CPDF class.

PDFLib improves performance and reduces memory requirements, while the R&OS CPDF class eliminates dependencies on external PDF libraries.

Features

  • Handles most CSS 2.1 and a few CSS3 properties, including import, media and 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 & column spans, separate & collapsed border models, individual cell styling
  • Image support (gif, png (8, 24 and 32 bit with alpha channel), bmp & jpeg)
  • No dependencies on external PDF libraries, thanks to the R&OS PDF class
  • Inline PHP support and basic SVG support
  • Basic SVG support (see "Limitations" below)

Requirements

  • PHP version 7.1 or higher
  • DOM extension
  • MBString extension
  • php-font-lib
  • php-svg-lib

Install

You can install ot using Composer:

composer require dompdf/dompdf

License

GNU Library or Lesser General Public License version 3.0 (LGPLv3)

Resources & Downloads

Dompdf
Download Dompdf for free. HTML to PDF converter for PHP. 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.
GitHub - dompdf/dompdf: HTML to PDF converter for PHP
HTML to PDF converter for PHP. Contribute to dompdf/dompdf development by creating an account on GitHub.






Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+