PHPOffice PHPPresentation lose original styling on saving pptx

拟墨画扇 提交于 2019-12-12 21:50:05

问题


I have simple code that:

  1. Load template pptx (*)
  2. Duplicate few slides
  3. Hydrate those slides with values (just replacing place-holder texts)
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!