This commit is contained in:
Martin Müller 2014-09-24 17:45:26 +02:00
parent 3fec1c5449
commit a1ea8dd3aa
1 changed files with 22 additions and 7 deletions

View File

@ -6,17 +6,26 @@ class XTCPDF extends TCPDF{
var $fontsize = 12 ; var $fontsize = 12 ;
var $font = 'freesans' ; var $font = 'freesans' ;
var $title = '' ; var $title = '' ;
var $mail = 'dasa@sdsa.de' ; var $mail = 'dasa@sdsa.de';
var $disableDesign = false;
function __construct($disableDesign=false) {
$this->disableDesign = $disableDesign;
}
function Header(){ function Header(){
$this->SetY(25); $this->SetY(25);
$this->SetTextColor(0,0, 0); $this->SetTextColor(0,0, 0);
$this->SetFont($this->font,'B',($this->fontsize)+2); $this->SetFont($this->font,'B',($this->fontsize)+2);
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(157,18,22))),1,'L'); if($this->disableDesign)
$this->SetY(22); $this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(84,84,84))),1,'L');
if($this->title=='')
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo-lang.png',0,15,64,15,'','','','',300,'R');
else 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'); $this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo.png',0,10,20,20,'','','','',300,'R');
} }
@ -24,9 +33,15 @@ class XTCPDF extends TCPDF{
$this->SetY(-20); $this->SetY(-20);
$this->SetTextColor(0, 0, 0); $this->SetTextColor(0, 0, 0);
$this->SetFont($this->font,'',$this->fontsize); $this->SetFont($this->font,'',$this->fontsize);
$this->Cell(0,8, $this->mail,array('T'=>array('width' => 1,'color'=>array(0,115,184))),1,'L'); if($this->disableDesign)
$this->Cell(0,8, $this->mail, array('T'=>array('width' => 1,'color'=>array(84,84,84))),1,'L');
else
$this->Cell(0,8, $this->mail,array('T'=>array('width' => 1,'color'=>array(0,115,184))),1,'L');
$this->SetY(-20); $this->SetY(-20);
$this->Cell(0,8,'www.dream-job.eu','',1,'R'); if($this->disableDesign)
$this->Cell(0,8,$this->PageNo()." von ".$this->getAliasNbPages(),'',1,'R');
else
$this->Cell(0,8,'www.dream-job.eu','',1,'R');
} }
} }
?> ?>