Simple HTML to PDF converter based on DOMPDF for Kohana Framework 3.2
// Create html from your template $html = View::factory('site/feedback/form/1')->render();// Create class instance PDF $pdf = PDF::factory($html); // Render and save PDF $pdf = $pdf->render()->save('your/path/upload', 'filename'); // OR // Render and streams the PDF to the client $pdf = $pdf->render()->load('filename');
If:
Fatal error: Class ‘DOMDocument’ not found
Solution: you must install the PHP5 - php5-dom
For CentOS
$ yum install php-xml