Hi, I'm building an application allowing users to create powerpoint presentations on the fly containing charts generated with jpgraph.
The following code produces a two slides powerpoint file with the text SLIDE1 and SLIDE2 in two different slides:
header("Content-type: application/vnd.ms-powerpoint");
header("Content-Disposition: attachment; filename=file.ppt");
echo "SLIDE 1\r\nSLIDE2";
I'd like to include a chart generated with jpgraph in a slide. Can anyone help me please? Thanks in advance
This other snippet generates an image from jpgraph using the image handler, but I can't make the image appearing in the powerpoint modifying the previous code.
require_once ('jpgraph2/src/jpgraph.php');
require_once ('jpgraph2/src/jpgraph_line.php');
$ydata = array(11,3,8,12,5,1,9,13,5,7);
$width=600;
$height=400;
$graph = new Graph($width,$height);
$graph->SetScale('intlin');
$lineplot=new LinePlot($ydata);
$graph->Add($lineplot);
header("Content-type: image/png");
$handler = $graph->Stroke(_IMG_HANDLER);
imagepng($handler);
imagedestroy($handler);

