mPDF Manual – mPDF Variables


(mPDF ≥ 5.7)

bool $CJKforceend

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

Configurable variables allow fine control of behaviour:

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

Default: false

$this->allowCJKorphans = true;


  • false: always wrap to next line
  • true: squeeze or overflow

Default: true

$this->allowCJKoverflow = false;


  • false: squeeze
  • true: overflow (only selected)

Default: false

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:

Fork me on GitHub