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((string) $keySlide), file_get_contents($oBkgImage->getPath())); } } return $this->getZip(); } }