aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php')
-rw-r--r--inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php b/inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php
new file mode 100644
index 00000000..12f592db
--- /dev/null
+++ b/inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php
@@ -0,0 +1,36 @@
1<?php
2
3include("../mpdf.php");
4
5$mpdf=new mPDF('','','','',15,15,57,16,9,9);
6$mpdf->SetImportUse();
7
8$mpdf->SetDisplayMode('fullpage');
9
10$mpdf->SetCompression(false);
11
12// Add First page
13$pagecount = $mpdf->SetSourceFile('sample_basic.pdf');
14
15$crop_x = 50;
16$crop_y = 50;
17$crop_w = 100;
18$crop_h = 100;
19
20$tplIdx = $mpdf->ImportPage(2, $crop_x, $crop_y, $crop_w, $crop_h);
21
22$x = 50;
23$y = 50;
24$w = 100;
25$h = 100;
26
27$mpdf->UseTemplate($tplIdx, $x, $y, $w, $h);
28
29$mpdf->Rect($x, $y, $w, $h);
30
31$mpdf->Output('newpdf.pdf', 'I');
32
33exit;
34
35
36?> \ No newline at end of file