We are getting plagued with this which started in April on working server. Everything was fine with our application until the customer reported that PDFs were no longer displaying the images.
Our PDF is generated via a HTML render first. When the HTML render is displayed the Image shows correctly. Also the image shows correctly if the image URL as noted in the mPDF is copied and pasted into a new tab.
However... If we load the image from a DIFFERENT DOMAIN then the image is rendered correctly. loading the image via absolute path, relative path or URL path all result in this error:
mPDF error: IMAGE Error (http://www.aibsonline.co.uk/logo.gif): Could not find image file
But, as you will see the logo url works when pasted. File permissions have been tested (which is why it is in the root) as standard and up to 777. Server is a Linux server in both cases we have seen so far.
HTML Code that renders the logo:
<div id="logo_wrapper" class="left">
<img width="107" height="76" src="<?php echo base_url('logo.gif'); ?>" />
</div>
At a real loss with this one and it is beginning to affect more and more clients.
Any help gratefully received.
UPDATE
The image renders if the rendering code and the image are in the same directory and we do NOT use an absolute path, eg.
<img width="107" height="76" src="logo.gif" />
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…