2014-04-22 20:50:23 +02:00
|
|
|
<?php
|
|
|
|
App::import('Vendor','tcpdf/tcpdf');
|
|
|
|
|
2014-04-22 22:17:01 +02:00
|
|
|
class XTCPDF extends TCPDF{
|
2014-04-22 20:50:23 +02:00
|
|
|
|
|
|
|
var $fontsize = 12 ;
|
|
|
|
var $font = 'freesans' ;
|
|
|
|
var $title = '' ;
|
|
|
|
var $mail = 'dasa@sdsa.de' ;
|
|
|
|
|
2014-04-23 15:14:14 +02:00
|
|
|
function Header(){
|
2014-04-22 20:50:23 +02:00
|
|
|
$this->SetY(25);
|
|
|
|
$this->SetTextColor(0,0, 0);
|
2014-04-28 22:49:00 +02:00
|
|
|
$this->SetFont($this->font,'B',($this->fontsize)+2);
|
2014-04-22 20:50:23 +02:00
|
|
|
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(157,18,22))),1,'L');
|
2014-04-28 22:49:00 +02:00
|
|
|
$this->SetY(22);
|
2014-04-22 20:50:23 +02:00
|
|
|
if($this->title=='')
|
2014-04-29 23:51:16 +02:00
|
|
|
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo-lang.png',0,15,64,15,'','','','',300,'R');
|
2014-04-22 20:50:23 +02:00
|
|
|
else
|
2014-04-22 22:17:01 +02:00
|
|
|
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo.png',0,10,20,20,'','','','',300,'R');
|
2014-04-30 00:37:42 +02:00
|
|
|
$this->SetMargins(25,25,20,25);
|
2014-04-30 00:38:23 +02:00
|
|
|
$this->SetHeaderMargin(50);
|
2014-04-30 00:37:42 +02:00
|
|
|
$this->SetFooterMargin(40);
|
2014-04-22 20:50:23 +02:00
|
|
|
}
|
|
|
|
|
2014-04-23 15:14:14 +02:00
|
|
|
function Footer(){
|
2014-04-22 20:50:23 +02:00
|
|
|
$this->SetY(-20);
|
|
|
|
$this->SetTextColor(0, 0, 0);
|
|
|
|
$this->SetFont($this->font,'',$this->fontsize);
|
|
|
|
$this->Cell(0,8, $this->mail,array('T'=>array('width' => 1,'color'=>array(0,115,184))),1,'L');
|
|
|
|
$this->SetY(-20);
|
|
|
|
$this->Cell(0,8,'www.dream-job.eu','',1,'R');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|