dreamjob/app/Vendor/tcpdf/xtcpdf.php

53 lines
1.6 KiB
PHP
Raw Normal View History

2014-04-22 20:50:23 +02:00
<?php
App::import('Vendor','tcpdf/tcpdf');
class XTCPDF extends TCPDF
{
var $fontsize = 12 ;
var $font = 'freesans' ;
var $title = '' ;
var $mail = 'dasa@sdsa.de' ;
/**
* Rot #9d1c16
* Blau #0073b8
* Overwrites the default header
* set the text in the view using
* $fpdf->xheadertext = 'YOUR ORGANIZATION';
* set the fill color in the view using
* $fpdf->xheadercolor = array(0,0,100); (r, g, b)
* set the font in the view using
* $fpdf->setHeaderFont(array('YourFont','',fontsize));
*/
function Header()
{
$this->SetY(25);
$this->SetTextColor(0,0, 0);
$this->SetFont($this->font,'B',$this->fontsize);
$this->Cell(0,0, $this->title, array('B'=>array('width' => 1,'color'=>array(157,18,22))),1,'L');
$this->SetY(25);
if($this->title=='')
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo-lang.png',0,5,20,30,'','','','',300,'R');
else
$this->Image(WWW_ROOT.DS.'img'.DS.'pdf-logo.png',0,5,20,20,'','','','',300,'R');
}
/**
* Overwrites the default footer
* set the text in the view using
* $fpdf->xfootertext = 'Copyright © %d YOUR ORGANIZATION. All rights reserved.';
*/
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,115,184))),1,'L');
$this->SetY(-20);
$this->Cell(0,8,'www.dream-job.eu','',1,'R');
}
}
?>