ceeram/CakePdf — pull request #39 by davidsteinsland (2013-09-10 22:18:56+00:00)
Title: Added PrinceXML

Install [PrinceXML](http://princexml.com) (CentOS):

```sh
wget http://www.princexml.com/download/prince-9.0-2.centos60.x86_64.rpm
sudo rpm -Uvh prince-9.0-2.centos60.x86_64.rpm

# Install msttcorefonts if Prince complains about this
wget ftp://rpmfind.net/linux/sourceforge/p/po/postinstaller/fuduntu/msttcorefonts-2.0-2.noarch.rpm
sudo rpm -Uhv msttcorefonts-2.0-2.noarch.rpm
```

Quick Use:
```php
public $components = array ('RequestHandler');
/**
* pages/testCakePdf/
* pages/testCakePdf.pdf
*/
public function testCakePdf()
{
$this->pdfConfig = array (
'engine'	=> 'CakePdf.PrinceXml'
);

// Layout: app/View/Layouts/pdf/default.ctp
// View: app/View/Pages/pdf/test_cake_pdf.ctp
}

public function testCakePdfSave()
{
App::uses ('CakePdf', 'CakePdf.Pdf');

$CakePdf = new CakePdf(array (
'engine'	=> 'CakePdf.PrinceXml'
));

$CakePdf->template('newsletter', 'default');
$pdf = $CakePdf->output();
$pdf = $CakePdf->write(TMP . DS . 'newsletter.pdf');

// Layout: app/View/Layouts/pdf/default.ctp
// View: app/View/Pdf/newsletter.ctp
}
```