# dompdf/dompdf

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/dompdf-dompdf).**

11,075 stars · 1,832 forks · PHP · lgpl-2.1

## Links

- GitHub: https://github.com/dompdf/dompdf
- Homepage: https://dompdf.github.io/
- awesome-repositories: https://awesome-repositories.com/repository/dompdf-dompdf.md

## Topics

`css` `dompdf` `font` `html` `html-to-pdf` `pdf-generation` `php`

## Description

Dompdf is a PHP library that functions as a document rendering engine, transforming HTML and CSS markup into portable document files. It operates by parsing web-based layout attributes and visual properties to generate static documents suitable for reports, invoices, or archival purposes.

The library distinguishes itself by integrating a resource-fetching pipeline that retrieves external stylesheets and images to maintain visual fidelity. It also supports the execution of server-side scripts during the document creation process, allowing for the injection of dynamic data and custom logic into the final output.

The rendering process involves converting web markup into a structured tree of geometric boxes, which are then translated into low-level vector instructions and text streams. This workflow includes calculating element dimensions, margins, and padding, as well as mapping font metrics to ensure accurate text wrapping and document flow.

## Tags

### Content Management & Publishing

- [Web-to-PDF Converters](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing-tools/format-conversion-toolkits/pdf-format-converters/web-to-pdf-converters.md) — Converts web markup and styling into portable document files by parsing layout attributes and visual properties. ([source](https://dompdf.github.io/))
- [PDF Generation Libraries](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/pdf-generation-libraries.md) — Provides a server-side tool for rendering dynamic documents from web content using standard web styling and layout engines.
- [Document Processing Engines](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing-engines.md) — Functions as a processing utility that integrates external stylesheets and images to produce accurate printable document outputs.

### Business & Productivity Software

- [Automated Reporting Systems](https://awesome-repositories.com/f/business-productivity-software/automated-reporting-systems.md) — Generates professional documents from web content by automatically fetching remote assets and applying consistent visual styling.

### Development Tools & Productivity

- [Dynamic Document Generators](https://awesome-repositories.com/f/development-tools-productivity/documentation-discovery-metadata/knowledge-documentation-management/documentation-knowledge-tools/documentation-generators/dynamic-document-generators.md) — Injects server-side logic and real-time data into templates to create personalized documents reflecting current application state.

### Graphics & Multimedia

- [PDF Rendering Primitives](https://awesome-repositories.com/f/graphics-multimedia/visualization-mapping/visualization-frameworks/low-level-rendering-engines/pdf-rendering-primitives.md) — Translates calculated layout trees into low-level vector instructions and text streams compatible with the portable document format.

### User Interface & Experience

- [HTML Layout Parsers](https://awesome-repositories.com/f/user-interface-experience/html-content-processing/html-content-processing/html-to-image-converters/html-layout-parsers.md) — Converts web markup into a structured tree of geometric boxes by calculating layout properties and visual styles.

### Web Development

- [CSS Box Model Renderers](https://awesome-repositories.com/f/web-development/dom-to-canvas-renderers/css-box-model-renderers.md) — Calculates element dimensions, margins, and padding to map web styling rules onto a coordinate-based canvas.
