DOMPDF takes time when it generates a PDF with Images

Viewed 320

I am trying to generate a PDF using dompdf where there is simple HTML with inline CSS. However, it contains 2 images whose size is less than 30KB in total. It is taking a minimum of 15 seconds to generate. I have my local environment with the below environment.

PHP ver 7.3 "barryvdh/laravel-dompdf": "^0.8.1", "laravel/framework": "5.3.*", Wamp server

Below is my HTML/ Blade file link

use Dompdf\Dompdf;
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->setPaper('A4', 'portrait');
$dompdf->render();
$dompdf->stream("sample.pdf", array("Attachment"=>0));
0 Answers
Related