dreamjob/app/Vendor/tcpdf/xtcpdf.php

46 lines
1.5 KiB
PHP
Raw Normal View History

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 = '' ;
2014-09-24 17:45:26 +02:00
var $mail = 'dasa@sdsa.de';
var $disableDesign = false;
function __construct($disableDesign=false) {
2014-09-24 21:13:56 +02:00
parent::__construct();
2014-09-24 17:45:26 +02:00
$this->disableDesign = $disableDesign;
}
2014-04-22 20:50:23 +02:00
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-09-24 17:45:26 +02:00
if($this->disableDesign)
2014-10-07 13:34:14 +02:00
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(0,99,184))),1,'L');
2014-09-24 17:45:26 +02:00
else
$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-09-24 17:45:26 +02:00
if(!$this->disableDesign)
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-09-24 17:45:26 +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-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);
2014-10-07 13:34:14 +02:00
$this->Cell(0,8, $this->mail,array('T'=>array('width' => 1,'color'=>array(0,99,184))),1,'L');
2014-04-22 20:50:23 +02:00
$this->SetY(-20);
2014-09-24 17:45:26 +02:00
if($this->disableDesign)
2014-09-24 21:15:34 +02:00
$this->Cell(0,8,$this->PageNo()." / ".$this->getAliasNbPages(),'',1,'R');
2014-09-24 17:45:26 +02:00
else
$this->Cell(0,8,'www.dream-job.eu','',1,'R');
2014-04-22 20:50:23 +02:00
}
}
?>