Monday, January 14, 2013

Re: viewing PDF

How silly, it was tagged out.

But now I get another error.
It can't get an object from an element.
Fatal error: Call to a member function add() on a non-object in D:\xampp\htdocs\VR\V6\app\View\Layouts\default.ctp on line 47



Op donderdag 10 januari 2013 17:35:17 UTC+1 schreef euromark het volgende:
You forgot the RequestHandler component, didnt you?


Am Donnerstag, 10. Januar 2013 17:19:15 UTC+1 schrieb Dr. Drijk:
I'm using the CakePdf-plugin to parse a view as pdf.

I added to \app\config\bootstrap.php :
 CakePlugin::load('CakePdf', array('bootstrap' => true, 'routes' => true));
 
 Configure::write('CakePdf', array(
        'engine' => 'CakePdf.WkHtmlToPdf',
        'margin' => array(
            'bottom' => 15,
            'left' => 50,
            'right' => 30,
            'top' => 45
        ),
        'orientation' => 'landscape',
        'download' => true
    ));

and to app\config\routes.php:
Router::parseExtensions('rss', 'json', 'xml', 'pdf');

I added the pdf-folders, and created  view.ctp, and default.cpt

When  I try the view action : /view/1 I get the corresponding view,
either when i try /view/1.pdf, I don't get a pdf-page but the same html

Where did it go wrong??.






--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate