I've recently started to work with the PHPPresentation library to create Powerpoint presentations. I need to change the background color of certain slides, I looked over the code samples that they offer and inside the developer documentation, they both lack this vital information.
php - How to change the background color for a PHPPresentation Slide?
I downloaded the repository from github and searched for 'background'. There were quite a few results, both in samples and the source code.
// Create slide echo date('H:i:s') . ' Create slide'.EOL; $oSlide1 = $objPHPPresentation->getActiveSlide(); $oSlide1->addShape(clone $oShapeDrawing); $oSlide1->addShape(clone $oShapeRichText); // Slide > Background > Color $oBkgColor = new Color(); $oBkgColor->setColor(new StyleColor(StyleColor::COLOR_DARKGREEN)); $oSlide1->setBackground($oBkgColor);