46 lines
1.5 KiB
PHP
46 lines
1.5 KiB
PHP
|
<?php
|
||
|
App::import('Vendor','tcpdf/tcpdf');
|
||
|
|
||
|
class XTCPDF extends TCPDF{
|
||
|
|
||
|
var $fontsize = 12 ;
|
||
|
var $font = 'freesans' ;
|
||
|
var $title = '' ;
|
||
|
var $mail = 'dasa@sdsa.de';
|
||
|
var $disableDesign = false;
|
||
|
|
||
|
function __construct($disableDesign=false) {
|
||
|
parent::__construct();
|
||
|
$this->disableDesign = $disableDesign;
|
||
|
}
|
||
|
|
||
|
function Header(){
|
||
|
$this->SetY(25);
|
||
|
$this->SetTextColor(0,0, 0);
|
||
|
$this->SetFont($this->font,'B',($this->fontsize)+2);
|
||
|
if($this->disableDesign)
|
||
|
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(0,99,184))),1,'L');
|
||
|
else
|
||
|
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(157,18,22))),1,'L');
|
||
|
$this->SetY(22);
|
||
|
if(!$this->disableDesign)
|
||
|
if($this->title=='')
|
||
|
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo-lang.png',0,15,64,15,'','','','',300,'R');
|
||
|
else
|
||
|
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo.png',0,10,20,20,'','','','',300,'R');
|
||
|
}
|
||
|
|
||
|
function Footer(){
|
||
|
$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,99,184))),1,'L');
|
||
|
$this->SetY(-20);
|
||
|
if($this->disableDesign)
|
||
|
$this->Cell(0,8,$this->PageNo()." / ".$this->getAliasNbPages(),'',1,'R');
|
||
|
else
|
||
|
$this->Cell(0,8,'www.dream-job.eu','',1,'R');
|
||
|
}
|
||
|
}
|
||
|
?>
|