mPDF Double-sided documents
<?php
// Define a document with default left-margin=30 and right-margin=10
$mpdf = new \Mpdf\Mpdf([
'margin_top' => 0,
'margin_left' => 30,
'margin_right' => 10,
'mirrorMargins' => true
]);
$mpdf->WriteHTML('Hello World');
$mpdf->AddPage();
// Now the right-margin (inner margin on page 2) = 30
$mpdf->WriteHTML('Hello World');
$mpdf->Output();