public function render()
{
$arrMedia = array();
for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) {
$shape = $this->getDrawingHashTable()->getByIndex($i);
if (!$shape instanceof Drawing\AbstractDrawingAdapter) {
continue;
}
$arrMedia[] = $shape->getIndexedFilename();
$this->getZip()->addFromString('Pictures/' . $shape->getIndexedFilename(), $shape->getContents());
}
foreach ($this->getPresentation()->getAllSlides() as $keySlide => $oSlide) {
// Add background image slide
$oBkgImage = $oSlide->getBackground();
if ($oBkgImage instanceof Image) {
$this->getZip()->addFromString('Pictures/' . $oBkgImage->getIndexedFilename($keySlide), file_get_contents($oBkgImage->getPath()));
}
}
return $this->getZip();
}