$ account mpdf
mPDF is a mature PHP library that generates PDF documents from UTF-8 encoded HTML content. It is not a standalone application but a dependency used within PHP projects (e.g., Laravel, Symfony) via Composer. The library parses HTML and CSS, handles complex typography (including bidirectional text, Indic and Myanmar scripts, hyphenation), and produces PDF output with support for barcodes, watermarks, forms, table of contents, PDF/A compliance, and encryption. The architecture follows a service-oriented pattern: the central `Mpdf` class orchestrates a set of specialized services (CSS parser, color converter, size converter, image processor, tag handlers, writers) assembled by a `ServiceFactory`. HTML tags are mapped to handler classes in `src/Tag/` that extend `BlockTag`, `InlineTag`, or `SubstituteTag`. PDF output is built by writer classes in `src/Writer/` that write raw PDF objects via a `BaseWriter`. External dependencies include FPDI for PDF import, PSR-3 logging, PSR-7 HTTP messages, and the `myclabs/deep-copy` library for table of contents page numbering. The library is extensively tested with over 200 unit tests and snapshot tests that compare generated PDFs against stored references.