On my server pdf generated via dompdf was not displaying images. Because they are remote url images.(local images are working fine) then I come to know that it needs some se
dompdf doesn't currently have a mechanism for distinguishing between a local and remote domain, so any URL that starts http://... is treated as remote. Plus, any image that uses a PHP-based intermediary (like pic.php) can't use a local path because the PHP will not be parsed unless you go through a web server.
It's a difficult prospect, but your pages are generated dynamically. So I see two options:
Since you've already worked out getting the image using curl you should be able to implement either one of these.
Just in case anyone has the same issues as me:
I changed src="https://" to src="http://" and the images loaded fine.
I also added all CSS inline within a <style>
instead of loading via <link>
and make sure the CSS <style>
is in the <head>
not the <body>
Try
$options = new Options();
$options->set('isRemoteEnabled', true);
$dompdf = new Dompdf($options);
Hi my solution to this problem was adding the enabling the allow_url_fopen in my php.ini file
I had the same problem, dompdf image not found on live server
I found its solution, you just need to double check the image path,
Considering your live server image path
<img src="http://www.example.com/public/images/thumb.png">
You just need to change it to,
<img src="public/images/thumb.png">
Note: Make sure that, all settings are same as you have already made.
I hope this will help you.
I had the same issue with images, and my solution was:
getcwd().'path/to/image'
It works for me!