Reputation: 1929
I'm developing an app that have a view with 3 table and 3 chart, I'm using framework bootstrap and chart.js. So my problem is that I need to allow to download this view as PDF file.
To do that I'm trying to use this : https://github.com/barryvdh/laravel-dompdf but it returns 8 empty pages and don't give me any error and I don't understand why.
The code to generate the pdf is that:
$pdf = PDF::loadView('backend.letter', compact('letter', 'stems', 'branches', 'hiddenStems', 'luckyStems', 'luckyBranches', 'hiddenStemsLuky', 'luckyYears'));
return $pdf->download('letter.pdf');
Anyone can help me?
Thank you
Upvotes: 0
Views: 4776
Reputation: 11
I think you should try https://github.com/barryvdh/laravel-snappy with wkhtmltopdf installed. This package has more functions and supports than DomPDF.
Upvotes: 1