- Module Versions: 1.1 *
- Module URL: https://github.com/abaranovskiy/Kohana-html2pdf
- Origin Module URL: https://github.com/sudeste/Kohana-html2pdf
- Compatible Kohana Version(s): 3.3.x
Module Kohana for convert HTML to PDF using class HTML2PDF
-
install module in bootstrap.php
-
In config file sets Your locate
- In Controller
Set up a configuration data
$config = array(
'author' => 'Your name',
'title' => 'Your title',
'subject' => 'Your subject',
'name' => Text::random().'.pdf', // name file pdf
);
Geterate an pdf from HTML
$view = View_PDF::factory('admin/report/pdf', $config)
->set('variable', $Data)
->render();