mPDF Manual – mPDF Variables

autoArabic

(mPDF ≥ 6.0)

Description

boolean autoArabic

Tells mPDF whether to try and distinguish between Arabic languages when using autoScriptToLang.

Analysis of the text will attempt to distinguish Arabic, Farsi, Pashto, Urdu and Sindhi. If active, the text will then be marked with a specific language tag e.g. "pa", "ur", "fa" etc.

Values

$autoArabic = true|false

Values

  • false: Arabic script will be marked with the attribute lang='und-Arab' when using autoScriptToLang.
  • true: mPDF will attempt to distinguish Arabic, Farsi, Pashto, Urdu and Sindhi, and text will then be marked with a specific language tag e.g. "pa", "ur", "fa" etc.

Default: false

Usage

Set at document initiation

<?php
$mpdf = new \Mpdf\Mpdf(['autoArabic' => true]);

See Also

Fork me on GitHub