mPDF Manual – mPDF Variables

mirrorMargins

(mPDF ≥ 4.0)

Description

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

Usage

Set at document initiation

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

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

See Also

Fork me on GitHub