Including dynamic image in powerpoint file

images php coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Thu Feb 02, 2012 6:46 am

Including dynamic image in powerpoint file

Postby phpfriend » Thu Feb 02, 2012 7:05 am

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/");
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);
$graph = new Graph($width,$height);
$lineplot=new LinePlot($ydata);
header("Content-type: image/png");
$handler = $graph->Stroke(_IMG_HANDLER);

Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest