phppdf Docs

Knuth-Liang TeX hyphenation for phppdf

Source ↗

Documentation

tex-hyphenator documentation

tex-hyphenator is a pure PHP implementation of the Knuth-Liang TeX hyphenation algorithm. It splits a word into the fragments allowed at valid hyphenation points, using the same pattern format as TeX (e.g. hy3ph, .ach4).

It implements the PhpPdf\Text\Hyphenator interface from phppdf/phppdf, so it plugs directly into TextBox and other phppdf text-layout components.

Requirements

RequirementVersion
PHP8.4+
ext-mbstringany

Installation

composer require phppdf/tex-hyphenator