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

@ -7,13 +7,22 @@ class XTCPDF extends TCPDF{
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);
if($this->disableDesign)
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(84,84,84))),1,'L');
else
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(157,18,22))),1,'L'); $this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(157,18,22))),1,'L');
$this->SetY(22); $this->SetY(22);
if(!$this->disableDesign)
if($this->title=='') if($this->title=='')
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo-lang.png',0,15,64,15,'','','','',300,'R'); $this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo-lang.png',0,15,64,15,'','','','',300,'R');
else else
@ -24,8 +33,14 @@ 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);
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->Cell(0,8, $this->mail,array('T'=>array('width' => 1,'color'=>array(0,115,184))),1,'L');
$this->SetY(-20); $this->SetY(-20);
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'); $this->Cell(0,8,'www.dream-job.eu','',1,'R');
} }
} }