Answers for "how to use dompdf in laravel"

PHP
1

how to use dompdf in laravel

//run following command
composer require dompdf/dompdf

// reference the Dompdf namespace
use Dompdf\Dompdf;

// instantiate and use the dompdf class
$dompdf = new Dompdf();
//pass html code to following function
$dompdf->loadHtml(<html>html</html>);

// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');

// Render the HTML as PDF
$dompdf->render();

// Output the generated PDF to Browser
$dompdf->stream();
Posted by: Guest on April-22-2022
1

install laravel dompdf

composer require barryvdh/laravel-dompdf --ignore-platform-reqs
Posted by: Guest on September-04-2021

Code answers related to "how to use dompdf in laravel"

Browse Popular Code Answers by Language