I'm using kineticJS to make a chart, so it's an html page that generates a chart drawing in a Div. in php, I want to include an image of that chart in a pdf I'm generating. KineticJS can convert the canvas to an image, but how can I get that image in a php script?
what I want is something like
<?php
$html="<img src='graph.html?x=20'></img>";
pdf->AddHTML($html);
$pdf->output();
?>
I'm a little bit lost on how I should be doing this. Ideally, the pdf should also embed the image. I'm not asking about the pdf stuff. I'm asking basically how you can get an image generated from KineticJS into a php script, as a base64 data or whatever.
do I need something like phantomJS running in order to do it?