mas que la accion, necesitamos ver tu vista, hay es donde esta el error a mi parecer, saludos!
*Aland Laines Calonge* Twitter: @lainessolutions http://about.me/aland.laines El 12 de marzo de 2013 05:00, MGracia <[email protected]> escribió: > Amigos, me he bajado la clase TCPDF . > Siguiendo este link http://bakery.cakephp.org/** > articles/kalileo/2010/06/08/**creating-pdf-files-with-**cakephp-and-tcpdf<http://bakery.cakephp.org/articles/kalileo/2010/06/08/creating-pdf-files-with-cakephp-and-tcpdf> > he tratado de configurar mi aplicacion. > Vengo trabajando el el Blog Tutorial de cake. > > Si mal no he hecho las cosas, deberia ver el pdf en > ...cakeblog/posts/viewPdf/2 > > pero al ejecutar esa petición me tira un error > An Internal Error Has Occurred. > > *Error: *An Internal Error Has Occurred. > Ahora si paso el enlace asi: cakeblog/posts/viewPdf > me tira este error > Sorry, there was no property ID submitted. > Lo cual esta bien porque no le estoy pasando el ID del post que quiero > visualizar como pdf. > > Que estoy configurando o haciendo mal??? > Alguna pista. > > Tengo creado estos archivos > ...View/Posts/viewPdf.ctp > ...View/Layouts/pdf.ctp > > en el postController tengo el metodo viewPdf según el ejemplo. > *function viewPdf($id = null) ** > ** { ** > ** if (!$id) ** > ** { ** > ** $this->Session->setFlash('Sorry, there was no property ID > submitted.'); ** > ** $this->redirect(array('action'=>'index'), null, true); ** > ** } ** > ** Configure::write('debug',0); // Otherwise we cannot use this > method while developing ** > ** $id = intval($id); ** > ** $property = $this->__view($id); // here the data is pulled from > the database and set for the view ** > ** if (empty($property)) ** > ** { ** > ** $this->Session->setFlash('Sorry, there is no property with > the submitted ID.'); ** > ** $this->redirect(array('action'=>'index'), null, true); ** > ** } ** > ** $this->layout = 'pdf'; //this will use the pdf.ctp layout ** > ** $this->render(); ** > ** } * > > Ayuda please! > SLDS. marcelo. > > -- > Has recibido este mensaje porque estás suscrito al grupo "CakePHP-es" de > Grupos de Google. > Para anular la suscripción a este grupo y dejar de recibir sus correos > electrónicos, envía un correo electrónico a > [email protected]. > Para publicar una entrada en este grupo, envía un correo electrónico a > [email protected]. > Visita este grupo en http://groups.google.com/group/cakephp-es?hl=es. > Para obtener más opciones, visita https://groups.google.com/groups/opt_out > . > > > -- Has recibido este mensaje porque estás suscrito al grupo "CakePHP-es" de Grupos de Google. Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a [email protected]. Para publicar una entrada en este grupo, envía un correo electrónico a [email protected]. Visita este grupo en http://groups.google.com/group/cakephp-es?hl=es. Para obtener más opciones, visita https://groups.google.com/groups/opt_out.
