aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php
blob: 12f592db84a25ded92fe17ee66f15692bf5b8822 (plain) (blame)
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
<?php

include("../mpdf.php");

$mpdf=new mPDF('','','','',15,15,57,16,9,9); 
$mpdf->SetImportUse();	

$mpdf->SetDisplayMode('fullpage');

$mpdf->SetCompression(false);

// Add First page
$pagecount = $mpdf->SetSourceFile('sample_basic.pdf');

$crop_x = 50;
$crop_y = 50;
$crop_w = 100;
$crop_h = 100;

$tplIdx = $mpdf->ImportPage(2, $crop_x, $crop_y, $crop_w, $crop_h);

$x = 50;
$y = 50;
$w = 100;
$h = 100;

$mpdf->UseTemplate($tplIdx, $x, $y, $w, $h);

$mpdf->Rect($x, $y, $w, $h);

$mpdf->Output('newpdf.pdf', 'I');

exit;


?>