Answers for "mPDF Double-sided documents"

PHP
0

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();
Posted by: Guest on May-21-2021

Browse Popular Code Answers by Language