This project is read-only.

Templating

Mar 4, 2010 at 4:36 PM

Hi,

I've downloaded the latest source code and have been looking at the templating test.  I've tried opening the resources\tempate.pptx file for editing and unfortunately the ppt creation fails after I save the file.  Is there any detail in how to create the template file?  The the errors I see are pasted below, I will continue to try work this out but any pointers would be appreciated.

Thanks

Error messages:

11:25:42 Create new PHPPowerPoint object
11:25:42 Set properties
11:25:42 Create slide
11:25:42 Create a shape (drawing)
11:25:42 Create a shape (rich text)
11:25:42 Write to PowerPoint2007 format

Warning: ZipArchive::getFromName() [function.ZipArchive-getFromName]: Invalid or unitialized Zip object in /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007/LayoutPack/TemplateBased.php on line 69

Notice: Trying to get property of non-object in /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007/LayoutPack/TemplateBased.php on line 70

Warning: Invalid argument supplied for foreach() in /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007/LayoutPack/TemplateBased.php on line 70

Warning: ZipArchive::close() [function.ZipArchive-close]: Invalid or unitialized Zip object in /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007/LayoutPack/TemplateBased.php on line 159

Notice: Undefined index: body in /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007.php on line 236

Fatal error: Uncaught exception 'Exception' with message 'Could not find slide layout Blank in current layout pack.' in /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007/LayoutPack.php:208
Stack trace:
#0 /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007/Rels.php(357): PHPPowerPoint_Writer_PowerPoint2007_LayoutPack->findLayoutIndex('Blank')
#1 /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007.php(281): PHPPowerPoint_Writer_PowerPoint2007_Rels->writeSlideRelationships(Object(PHPPowerPoint_Slide), 1)
#2 /var/www2/html/devel/ppt2/Tests/05templated.php(89): PHPPowerPoint_Writer_PowerPoint2007->save('/var/www2/html/...')
#3 {main}
 thrown in /var/www2/html/devel/ppt2/Classes/PHPPowerPoint/Writer/PowerPoint2007/LayoutPack.php on line 208