This project is read-only.

JPGRAPH

Dec 1, 2009 at 9:04 AM
Edited Dec 1, 2009 at 9:09 AM

How to put a jpgraph image into phppowerpoint.

I can retreive the image handler, but using the PHPPowerPoint_Shape_MemoryDrawing class results in an pptx that is not correct.
After renaming the pptx to zip, i see that the image is made, but has a size of 277, which is not more than the handler resource id.

$handleGrafiek = $graph->Stroke(_IMG_HANDLER);

$shape = new PHPPowerPoint_Shape_MemoryDrawing();
$shape->setName('Grafiek');
$shape->setDescription('Grafiek');
$shape->setImageResource($handleGrafiek);
$shape->setRenderingFunction(PHPPowerPoint_Shape_MemoryDrawing::MIMETYPE_PNG);
$shape->setMimeType(PHPPowerPoint_Shape_MemoryDrawing::MIMETYPE_DEFAULT);
$shape->setHeight(36);
$shape->setOffsetX(10);
$shape->setOffsetY(10);
$currentSlide->addShape($shape);

Please can anybody help me with this issue?