Hi all,
I am trying ThuJohn's DOMPDF wrapper for L4 and am having a little problem rigtht off the bat. I am trying to take a view and dump it straight into the PDF::load function but it is clearly unhappy with me and hangs. here is the code:
$html = View::make('customers.jobsheet');
return PDF::load($html, 'A4', 'portrait')->show();
I then gave a shot to rendering the content explicitly as a string:
$html = View::make('customers.jobsheet');
$string = $html->render();
return PDF::load($string, 'A4', 'portrait')->show();
But no luck. Any help is always much appreciated.
Thanks, Scott
In case anyone else comes across this issue: It turned out to be the contents of that blade template above that was causing the problem. I haven't narrowed it down, but I put another simpler, vanilla-html and CSS blade file into the same code and it worked perfectly. The DOMPDF page gives a handful of primarily CSS3 limitations and I am guessing my original file wasn't terribly compliant.
Happy coding!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community