DOMPDF image not showing

PHP Errors No Comments

DOMPDF image not showing

DOMPDF image not showing in your PHP script like the above screenshot.
Don’t worry, it’s just a small problem.

First of all get the latest version of the library from this Github link.

If DOMPDF image not showing when you download the PDF in your script then it means your DOMPDF is not allowing remote URLs.
In order to do this, just enable remote URL by setting isRemoteEnabled variable to true. Please have a look at the below mentioned code and you will understand it:

$options = new Options();
$options->set('isRemoteEnabled', true);
$dompdf = new Dompdf($options);

These 3 lines will resolve your issue of images not showing in your downloaded PDF and you will have all the images showing properly in your PDF.

Hope this helps.

Don’t forget to checkout tutorial of DOMPDF Example in PHP.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments