sluggerdog
sluggerdog

Reputation: 843

CakePdf - Engine not loaded

I have installed CakePdf plugin for cakephp as outlined in the readme file on GitHub. I am getting an error saying the engine iisnt loaded. I have tried all 3 engines that come with the plugin. Anyone else have this issue and find a solution? Rhanks

Upvotes: 1

Views: 1435

Answers (1)

Leendert
Leendert

Reputation: 118

http://www.slideshare.net/jellehenkens/building-php-documents-with-cakepdf-cakefest-2012

Here is a slideshow how to install the plugin, To load the engine use this in bootstrap.php

Configure::write('CakePdf', array(
        'engine' => 'CakePdf.DomPdf',

       'pageSize'=>'A4',

        'orientation' => 'landscape',

    ));

Go to your controller en use in your public function view or index this:

$this -> pdfConfig = array (
            'orientation' => 'landscape',
            'download' => true,
            'filename' => 'Client_' . $id
        );

i hope this will help you,

Upvotes: 2

Related Questions