// Load PDF library
$pdf = \PDF::factory('tcpdf')->init();
// Any parameters you provide in the init function are
// provided to the construct of the driver
// eg: $pdf = \PDF::factory('tcpdf')->init('P', 'mm', 'A4');
// Normally to add a page you call addPage();, but this class is smart and adapts
$pdf->add_page();
$pdf->output();
) The entire method is missing in this call...fueldocsogood wrote on Wednesday 27th of June 2012:And now I get this error:
Exception [ Error ]: Call to undefined method Pdf\Pdf:)
$view = View::forge('test/view', $data);
$pdf = Pdf::forge('dompdf')->init();
$pdf->set_paper('A4');
$pdf->load_html($view);
$pdf->render();
$pdf->stream('test.pdf');
In my view head, I have
<?php echo Asset::css('pdf.css'); ?>
// The true param is to echo the Raw CSS. Note, it includes the <style type="text/css"></style> tags
<?php echo Asset::css('pdf.css', array(), null, true); ?>
Package::load('pdf');
Thanks a lot,It looks like you're new here. If you want to get involved, click one of these buttons!