From a1ea8dd3aa19ba038b536f73c53e375790688118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 24 Sep 2014 17:45:26 +0200 Subject: [PATCH] #99 --- app/Vendor/tcpdf/xtcpdf.php | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/app/Vendor/tcpdf/xtcpdf.php b/app/Vendor/tcpdf/xtcpdf.php index 59116d4..c3e395a 100644 --- a/app/Vendor/tcpdf/xtcpdf.php +++ b/app/Vendor/tcpdf/xtcpdf.php @@ -6,17 +6,26 @@ class XTCPDF extends TCPDF{ var $fontsize = 12 ; var $font = 'freesans' ; var $title = '' ; - var $mail = 'dasa@sdsa.de' ; + var $mail = 'dasa@sdsa.de'; + var $disableDesign = false; + + function __construct($disableDesign=false) { + $this->disableDesign = $disableDesign; + } function Header(){ $this->SetY(25); $this->SetTextColor(0,0, 0); $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'); - $this->SetY(22); - if($this->title=='') - $this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo-lang.png',0,15,64,15,'','','','',300,'R'); + 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->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'); } @@ -24,9 +33,15 @@ class XTCPDF extends TCPDF{ $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'); + 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->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'); } } ?>