How are you linking to the PNG file? I have successfully created PDFs
with images in, but you might need to use the full path to the image, e.g.
<img src="/path/to/image.png" width="100" height="100" />
and not:
<img src="image.png" width="100" height="100" />
The same applies to other external files, such as stylesheets.
The PHP code shouldn't be any different than what you use to generate
any other PDF file using dompdf - the snippet I use is:
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper('a4', 'landscape');
$dompdf->render();
file_put_contents($filename, $dompdf->output());
Where $html contains the HTML (e.g. extracted from a file) and $filename
is where you want to save the PDF.
Paul
--
Paul Waring
http://www.pwaring.com
Commenting out the img line works but including it I get a 500 error.
Have you tried another image, preferably using a local filename? That
would help narrow the problem down.
$s="<img src="ucla.png"/>";
should be
$s = "<img src=\"ucla.png\" />";
or
$s = "<img src='ucla.png' />";
$s = '<img src="ucla.png" />';
Probably the best option is to use single quotes as then you don't have
to worry about escaping a lot of things.