Open jschiedt opened 4 years ago
We've added bug report issue template to ease helping. Can you edit your message to follow the new template ?
Thanks
PHP-Code: $basePPTX = new PPTX('/var/www/html/test.pptx'); $endPPTX = new PPTX('/var/www/html/test.pptx'); $basePPTX->addSlides($endPPTX->getSlides()); $basePPTX->saveAs('/var/www/html/result.pptx');
PPTX-Files: test.pptx result.pptx
Expected behavior: PPTX will open and display 4 slides
Actual behavior: Error message when opening file:
Error message after klicking on yes (repair file)
Added slides have no background:
Linux 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 PHP Version 7.1.33 PowerPoint2007
Has anyone found a resolution to this issue? Currently seeing the same thing
@TZK- Have you been able to look into this issue?
@TZK- and I don't have enough time to fix this problem as quickly as possible. Any help is welcome
Thank you for your response; do you have any idea what would cause this issue? I'm searching for a solution now but any clues would be appreciated
Thank you too,
Maybe the file reference (.rels) is missing in an XML file. Sometimes it is possible to repair the PPTX generated with Powerpoint. In this case it' s interesting to compare the file fixed by powerpoint with the one generated by the lib.
Also, to prevent some incompatibility, we have deliberately blocked the copy of certain reference, it is perhaps this one that poses a problem today.
Have a look at /Presentation/Resource/Presentation.php and /Presentation/Resource/Slide.php at 155.
Thank you in advance
I am currently experiencing the same problem, has anybody made some progress yet?
One thing I already discovered when comparing the version of the file that Powerpoint fixed with the original merged file, was the very different assignment of rIDs. Another thing which does not work on my machine is the generation of unique IDs for the master slides (too big for 32-bit integer, floats do not seem to work), anybody else had that problem in this context?
I couldn't find any fixed by editing the library files, but what did work for me is to open the source ppt file in powerpoint and run the File > Inspect option, then fix anything it found. This included : removing notes by clicking the remove button on the tool, removing external documents (most often by rasterizing charts and using a picture rather than the actual chart), removing hidden content by clicking the remove button on the tool. Once I did this everything seemed to work with the library.
A few additional notes:
Hope this helps, Good Luck!
Thanks @abarrett86 but your solution did not work for us unfortunately. I put in some work and compared the presentation fixed by Powerpoint with the generated one (simply merging two presentations with one empty slide each). I did the comparison by replacing the fixed files in the archive with the damaged ones one by one and these were the changes not accepted by Powerpoint (repair dialogue showing up again):
I don't know if just referencing new slides to the original master is a possible feature, but adding a whole new set of master slides everytime slides are added to a presentation seems weird to me as with the features this library offers I think most people are going to want to merge PPTs with the same Master.
We are currently using a workaround which works fine but my company can not put the time in to fix the library code ourselves, but we would appreciate a fix in the near future so we can use your library as intended. @camillebaronnet @TZK-
I open a pptx with a layout containing a background image using $basePPTX = new PPTX($path1); and save it $basePPTX->saveAs($path2);
everything is fine.
I add the same pptx again: $endPPTX = new PPTX($path1); $basePPTX->addSlides($endPPTX->getSlides());
I get a message, if I want to repair the pptx, then I get a message, that certain slides cannot be displayed. for other slides no layout exists.
if I add different presentations I get the same messages, but only layouts are missing for the added slides.
do you have any idea?