Reputation: 519
How do I remove the margin set at 4 sides of the page in Mpdf v7?
I've already tried the following code but it didn't work:
$mpdf = new \Mpdf\Mpdf( [ 'utf-8', 'A4', 0, '', 0, 0, 0, 0, 0, 0 ] );
I've also tried this but I encountered a division by zero error:
$mpdf = new \Mpdf\Mpdf( [
'mode' => 'utf-8',
'format' => 'A4',
'margin_left' => 0,
'margin_right' => 0,
'margin_top' => 0,
'margin_bottom' => 0,
'margin_header' => 0,
'margin_footer' => 0
] );
Upvotes: 1
Views: 1506
Reputation: 6745
Your second example is correct.
If you are experiencing a division by zero error, try updating to a higher, preferably the latest version (v8.0.2) which works without errors.
Upvotes: 1