PHPPresentation
PHPPresentation copied to clipboard
Table styles are lost when you copy from an existing slide
$slideMap = [];
$slides = $this->objPHPPresentation->getAllSlides();
foreach ($slides as $slide) {
for ($i = 0; $i < 2; $i++) {
$clonedSlide = $slide->copy();
$slideMap[] = $clonedSlide;
}
}
for ($i = count($slides) - 1; $i >= 0; $i--) {
$this->objPHPPresentation->removeSlideByIndex($i);
}
foreach($slideMap as $slide) {
$this->objPHPPresentation->addSlide($slide);
}
I am just cloning a slide, adding it to the slideMap so I can add re-add them after, removing all the slides from phppresentation object to start fresh then looping through and adding them all, the table styles go from a fill colour to all black?
Just to update, even this does not work
$slide = $this->objPHPPresentation->getSlide();
$clonedSlide = $slide->copy();
$this->objPHPPresentation->addSlide($clonedSlide);
Table ends up black