Mpdf : Set 0 margin for page 1 only
$mpdf = new \Mpdf\Mpdf([ 'tempDir' => __DIR__ . '/temp' ]); $mpdf->SetMargins(0, 0, 0); // will set it to 0 for all pages. Is it possible to have 0 margins for page 1 of a PDF page and default margins for the rest of pages of the document ? I'm currently testing this with Version 7.0. If you do not need automatic content overflow for page 1 and other pages, you can use AddPageByArray() method: $mpdf = new \Mpdf\Mpdf([]); $mpdf->AddPageByArray([ 'margin-left' => 0, 'margin-right' => 0, 'margin-top' => 0, 'margin-bottom' => 0, ]); $mpdf->WriteHTML($html1); // first page $mpdf->AddPageByArray([