Eyiipdf - Html2Pdf_Exception

I am using EYiiPdf extension to create PDFs from html markup and I cannot place an image either in the header or body of the document. I keep getting HTML2PDF_exception - ERROR n°6 : Impossible to load the image.

I have tried using a relative path to image and an absolute path with no success. I know that allow_url_fopen is on according to ini_get. I tried changing permissions of the images directory as well in desperation. The code I am using is cut down to the following in the effort to find the root cause.




$pdfLayout = "<page>

<page_header>

</page_header> 

<img src = 'http://arm-cc.com/Compliance/images/headerimg1.jpg'> //relative ./images/headerimg1.jpg

<page_footer>						        	

</page_footer>

</page>";


$html2pdf = Yii::app()->ePdf->HTML2PDF();

$html2pdf->WriteHTML($pdfLayout);

$new_file = $dir.'/Client_'.$clientdata['provider_id'].'_'.$today.'.pdf'; 

$html2pdf->Output($new_file, 'F');



Does anyone have any suggestions or reasons why this is failing?

For what it is worth after much reading setting the variable that holds the html layout as follows resolves the problem. Not XHTML compliant however it works




$pdfLayout = 	"<page style=\"font-size: 12pt\">

                        <table cellspacing=\"0\" style=\"width: 100%; text-align: center; font-size: 14px\">

			<tr>

			<td style=\"width: 100%;\">

			<img style=\"width: 100%;\" src=\"./images/headerimg1.jpg\">

			</td>							            

			</tr>

			</table>

                 </page>";