Level 52
Hi
A I can see this package uses dompdf methods so you must set and HTML value as parameter. Just use render() from your template to get it work.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I am using this
https://github.com/thujohn/pdf-l4
The example code is below but can I insert a blade template into $html?
$html = '<html><body>'
. '<p>Put your html here, or generate it with your favourite '
. 'templating system.</p>'
. '</body></html>';
return PDF::load($html, 'A4', 'portrait')->show();
Please or to participate in this conversation.