Open delia-curiel opened 7 years ago
any update on this? lost most of the formatting when I tried to read previously generated pptx by phpPresentation
@delia-curiel or @dookieffs Have you got two pptx in error to share ?
I've the same problem.
This code should do the job:
$ppt_reader = IOFactory::createReader('PowerPoint2007');
// Create destination and add all slides.
$destination = new PhpPresentation();
// The first slide is empty as it's added on the create operation.
$destination->removeSlideByIndex(0);
foreach ($this->souce_slides as $souce_slide) {
$file = drupal_realpath($souce_slide);
$sourceSlideShow = $ppt_reader->load($file);
foreach ($sourceSlideShow->getAllSlides() as $oSlide) {
$destination->addExternalSlide($oSlide);
}
}
$xmlWriter = IOFactory::createWriter($destination, 'PowerPoint2007');
Even with just one pptx file, the result doen't have some text boxes.
Hi, I can't merge two pptx files into one. The result pptx has all slides in blank. Here is my code: