Welcome! dompdfui helps you turn HTML documents and written pages into polished, downloadable PDF files — quickly and without fuss. You don't need to understand technical details to generate PDFs from HTML/CSS: dompdfui bundles a small PHP runtime and the Dompdf library into a single portable executable so you can convert local or remote HTML into printable, styled PDF documents.
This is a small, portable command-line tool that combines "Static-PHP-cli" and the "Dompdf" library to convert HTML documents to PDF. The executable extracts a PHP interpreter and Dompdf into a temporary directory during runtime, performs the conversion, and cleans up after completion — so there are no external runtime dependencies to install.
Whether you need a shareable invoice, a printable report, a resume, or a saved copy of a webpage, dompdfui gives you an easy way to create PDFs while preserving CSS styling and layout. It supports local and remote stylesheets, embedded fonts (via @font-face), images and complex tables so your output looks like the original page.
Usage: dompdfui [OPTIONS] INPUT-FILE1 [INPUT-FILE2] [...] OUTPUT-DIR
| Short Option | Long Option | Default | Description |
|---|---|---|---|
-v |
--version |
— | Print version |
-h |
--help |
— | Print help message |
-m |
--php-memory-limit |
268435456 | Limits the amount of memory (in bytes) the PHP CLI can use |
-f |
--force-out |
— | Replace output file if it exists |
| — | --isRemoteEnabled |
false | Enable remote file access (images, fonts, stylesheets) when set to true |
| — | --isJavascriptEnabled |
true | Enable inline JavaScript processing (if applicable) |
| — | --isFontSubsettingEnabled |
true | Enable font subsetting to reduce output size |
| — | --sslAllowSelfSigned |
false | Allow downloading assets from servers with self-signed or problematic SSL certificates (requires remote enabled) |
| — | --dpi |
96 | Image DPI setting; determines default DPI for images and fonts |
| — | --fontHeightRatio |
1.1 | Ratio applied to font height to better match browser line height |
| — | --defaultPaperSize |
a4 | Default paper size (e.g. a4, letter, a3, etc.) |
| — | --defaultPaperOrientation |
portrait | Page orientation: portrait or landscape |
| — | --allowedRemoteHosts |
— | List of allowed remote hostnames (can be specified multiple times) used to filter remote requests |