问题
I have simple code that:
- Load template pptx (*)
- Duplicate few slides
- Hydrate those slides with values (just replacing place-holder texts)
- Save result to new file
Unfortunately PHPOffice's PHPPresentation is unable to retain slide styling present in template.
Slides saved in step 4. are all white (default styling).
Is there a way to explicitly copy that styling? Is it PHPPresentation limitation 'cause it's unable to read styling or something?
(*) Described issue persist for ppt/odp too. No styling is retained.
回答1:
The bug is that PHPPresentation (oldly PHPPowerPoint) can't load Slide Layout and Slide Master.
This bug has an opened issue : https://github.com/PHPOffice/PHPPresentation/issues/161.
来源:https://stackoverflow.com/questions/33472573/phpoffice-phppresentation-lose-original-styling-on-saving-pptx