layout = 'pdf'; //this will use the pdf.thtml layout $this->set('data','hello world!'); $this->render(); } } ?>