-
Notifications
You must be signed in to change notification settings - Fork 147
/
example42_MPDFI_templatedoc.php
38 lines (30 loc) · 940 Bytes
/
example42_MPDFI_templatedoc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require_once __DIR__ . '/bootstrap.php';
$mpdf = new \Mpdf\Mpdf([
'margin_left' => 15,
'margin_right' => 15,
'margin_top' => 57,
'margin_bottom' => 16,
'margin_header' => 9,
'margin_footer' => 9
]);
$mpdf->SetDocTemplate('pdf/sample_logoheader2.pdf',1); // 1|0 to continue after end of document or not - used on matching page numbers
//===================================================
$mpdf->AddPage();
$mpdf->WriteHTML('Hello World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hello World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hello World');
//===================================================
$mpdf->RestartDocTemplate();
//===================================================
$mpdf->AddPage();
$mpdf->WriteHTML('Hello World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hello World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hello World');
//===================================================
$mpdf->Output();
$mpdf->cleanup();