cmc-sales/app/vendors/xfpdi.php
2013-03-23 16:25:52 +11:00

30 lines
560 B
PHP
Executable file

<?
App::import('Vendor', 'tcpdf/tcpdf');
App::import('Vendor', 'fpdi/fpdi');
class XFPDI extends FPDI {
var $files = array();
function setFiles($files) {
$this->files = $files;
}
function concat() {
foreach($this->files AS $file) {
$pagecount = $this->setSourceFile($file);
for ($i = 1; $i <= $pagecount; $i++) {
$tplidx = $this->ImportPage($i);
$this->AddPage();
$this->useTemplate($tplidx);
}
}
}
}