1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00
wallabag/inc/3rdparty/libraries/mpdf/examples/example41_MPDFI_template.php
2014-07-24 15:49:36 +02:00

36 lines
No EOL
532 B
PHP

<?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;
?>