Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dompdf and img tag, image wont show

Here is the HTML just before $dompdf->render() and $dompdf->output() are called:

<img src="http://www.example.com/images/Logo.png" />

All other invoices display the image fine when viewing in the browser, or printing it, or emailing it as HTML. When I click 'Generate PDF' inside of our application, it renders the invoice in PDF, except the logo is missing. I have put a debugging line in to email me the raw HTML it sends to the render(), and it looks fine to me.

Does anyone have any idea why dompdf won't display this image?

like image 526
Kevin Avatar asked Dec 01 '10 18:12

Kevin


1 Answers

An idea: if you are providing full URI to the image it is treated as external, so defined costant DOMPDF_ENABLE_REMOTE must be set to true.

like image 50
dev-null-dweller Avatar answered Sep 23 '22 01:09

dev-null-dweller