mPDF Manual – mPDF Variables


(mPDF ≥ 4.0)


Set to 1, the document will mirror the left and right margin values on odd and even pages i.e. they become inner and outer margins. (this is automatically reversed for RTL languages).

NB Headers and footers use the ‘Odd’ pages as default if this is not used.

Default: 0


Set at document initiation

// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new \Mpdf\Mpdf(['mirrorMargins' => 1]);

See Also

Fork me on GitHub