mPDF Manual – mPDF Variables


(mPDF >= 5.7)

CJK line-breaking is implemented in mPDF roughly according to accepted rules.

Configurable variables allow fine control of behaviour:

    $this->CJKforceend = false; // Forces overflowng punctuation to hang outside right margin (used with CJK script)

    $this->allowCJKorphans = true;    // FALSE=always wrap to next line; TRUE=squeeze or overflow

    $this->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only selected)

IF $this->allowCJKorphans == true AND $this->allowCJKoverflow == true AND $this->CJKforceend == true AND text-align:justify

will force hanging punctuation to hang outside right margin.

See also allowCJKoverflow and allowCJKorphans