Dompdf is a free, open-source HTML-to-PDF converter written in PHP. It parses HTML and CSS markup and renders it into PDF documents, making it one of the most popular choices for generating PDFs dynamically in PHP web applications — such as invoices, reports, receipts, and order confirmations.
Dompdf supports a broad subset of HTML5 and CSS 2.1 (with some CSS3 features), including floats, tables, list styles, background images, and web fonts. It uses a built-in PDF rendering engine and optionally leverages the GD or Imagick PHP extension for image processing, and the php-font-lib for custom web font support.
It can be used as a standalone library, integrated via Composer into any PHP project, or embedded into frameworks like Laravel, Symfony, and CodeIgniter. Dompdf is straightforward to implement — just a few lines of PHP are needed to convert any HTML string or file into a downloadable PDF.
Key Features
- HTML and CSS rendering – Supports HTML5 structure and CSS 2.1 including floats, tables, margins, padding, and backgrounds.
- Web font support – Embed custom fonts (TTF, OTF) into generated PDFs via php-font-lib integration.
- Image embedding – Inline images (PNG, JPEG, GIF, SVG) are embedded directly into the output PDF.
- Composer integration – Install via Composer with
composer require dompdf/dompdffor easy dependency management. - Stream or save output – Output PDFs directly to the browser as a download, inline preview, or save to disk.
- Paper size and orientation – Configurable page size (A4, Letter, etc.) and portrait/landscape orientation.
- Framework compatibility – Works with Laravel, Symfony, CodeIgniter, and any PHP project via Composer.
How to Install
- Install Dompdf via Composer:
composer require dompdf/dompdfin your PHP project root. - Include the Composer autoloader in your PHP file:
require_once 'vendor/autoload.php'; - Import and instantiate Dompdf:
use Dompdf\Dompdf; $dompdf = new Dompdf(); - Load HTML content:
$dompdf->loadHtml('<h1>Hello PDF</h1>');and render:$dompdf->render(); - Output the PDF to browser:
$dompdf->stream('output.pdf');— the browser will download or display the generated file.
Frequently Asked Questions about Dompdf – HTML to PDF Conversion Library for PHP
Is Dompdf – HTML to PDF Conversion Library for PHP free?
Dompdf – HTML to PDF Conversion Library for PHP is completely free to download and use — no registration or payment required.
What are the system requirements for Dompdf – HTML to PDF Conversion Library for PHP?
Minimum requirements: Windows7,8,10,11. A modern PC with at least 2GB RAM is recommended.
What is the latest version of Dompdf – HTML to PDF Conversion Library for PHP?
The latest version is 3.1.0, updated on 05/09/2025.
Is Dompdf – HTML to PDF Conversion Library for PHP safe to download?
Yes. All software listed on download.viet33.com is sourced directly from the official developer and verified before publishing. No bundled adware or malware.
Does Dompdf – HTML to PDF Conversion Library for PHP work on Windows 11?
Yes, Dompdf – HTML to PDF Conversion Library for PHP is compatible with Windows7,8,10,11, including Windows 11.
Download Foxit PDF Reader 2026.1.2
47 Downloads
Download Bluesofts AccHelper 3.1.0
46 Downloads
Download Microsoft Office 365 Professional Plus
46 Downloads
Download Microsoft Excel 2016
51 Downloads
Download Adobe Reader XI 11.0.23
51 Downloads