The generated image can be accesses directly through the webserver.
I load the html into dompdf by doing this:
$dompdf = new DOMPDF();
$dompdf->load_html($body_start.$pdf_text.$body_end);
$dompdf->set_paper("A4");
$dompdf->render();
$dompdf->stream("pdf_generator.pdf");
$body_start contains the start of the html output: <html><head>....
and the inline php to include a header and a footer on every page.
$pdf_text contains a html table and the jpgraph image:
<table>
.....
<tr>
<td colspan="5">
<img alt="GANTT" id="gantt" src="
http://gant.mydomain.de/image/php/
mygantt.php?mySID=xyz" border="0" style="margin-top:5px;margin-left:
17px;" >
</td>
</table>
$body_end closes the <html><body> TAGs.
If I call the gant graph by typing the url in the browser, the graph
appears.
If I echo the ($body_start.$pdf_text.$body_end) instead of using
dompdf everything looks great too.
So at the moment, I let write the generated graphs into static png
files by the mygantt.php script.
The html contains then: <img alt="GANTT" src="image/php/temp/
gantt_[feld:user_id].png" width="655" border="0" />
This is done before the user is able start the pdf output by clicking
on the icon. Now the image appears in the pdf.
But this is not perfect, because a lot of files will be created
regardless of whether they are needed or not.