diff --git a/app/Controller/PdfController.php b/app/Controller/PdfController.php index 8dff0e1..9c69545 100644 --- a/app/Controller/PdfController.php +++ b/app/Controller/PdfController.php @@ -4,7 +4,7 @@ App::uses('AppController', 'Controller'); class PdfController extends AppController { - public $uses = array('DreamjobJobApplication','DreamjobCvEntry'); + public $uses = array('DreamjobJobApplication','DreamjobCvEntry','DreamjobListCvCategory'); public function applicationGetPdf(){ $this->MiconwareSession->init($this); @@ -25,8 +25,10 @@ class PdfController extends AppController { $this->render('/Home/error'); }else{ $this->set('application',$application); - $cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $application['DreamjobJobApplication']['worker_id']))); - $this->set("cv",$cv); + //$cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $application['DreamjobJobApplication']['worker_id']))); + //$this->set("cv",$cv); + //$cvp0 = $this->DreamjobListCvCategory->find('first',array('conditions' => array('DreamjobListCvCategory.position' => 0))); + //$this->set('cvp0', $cvp0); $this->layout = 'pdf'; $this->render('/Pdf/opening'); } diff --git a/app/View/Pdf/opening.ctp b/app/View/Pdf/opening.ctp index 947067b..b3962ea 100644 --- a/app/View/Pdf/opening.ctp +++ b/app/View/Pdf/opening.ctp @@ -49,13 +49,16 @@ $tcpdf->SetFont($tcpdf->font); $tcpdf->writeHTMLCell(0,175,10,95, $application['DreamjobJobApplication']['text'], $dev,0,false,true,'L'); //Lebenslauf -//Anschreiben +$tcpdf->SetAutoPageBreak( true ); $tcpdf->title=__('dreamjob.cv'); $tcpdf->AddPage(); $tcpdf->SetY(35); $tcpdf->SetTextColor(0, 0, 0); $tcpdf->SetFont($tcpdf->font); +$tcpdf->writeHTMLCell(0,235,10,35, $this->element('user_worker_cv'), $dev,0,false,true,'L'); + +$tcpdf->SetAutoPageBreak( false ); //Anhang foreach($application['Page'] as $page){