Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: wants to repair powerpoint #89

Open
chuebert opened this issue Feb 11, 2015 · 46 comments
Open

Error: wants to repair powerpoint #89

chuebert opened this issue Feb 11, 2015 · 46 comments

Comments

@chuebert
Copy link

chuebert commented Feb 11, 2015

I get an error with powerpoint 2010.
I have the current version and get an error that wants to repair the powerpoint.
How can i fix this?

@Progi1984
Copy link
Member

@chuebert Have you got always the problem ? With develop branch ?

If yes, could you give us a file (simple) generated with PowerPoint2010 ?
In this case, I need to analyze differences between PPT2007 & PPT2010.

@Progi1984 Progi1984 added this to the Waiting For Answer milestone Jun 15, 2015
@dami95
Copy link

dami95 commented Jun 15, 2015

Similar problem in PowerPoint For Mac 2011 (version 14.0).

@dami95
Copy link

dami95 commented Jun 15, 2015

zrzut ekranu 2015-06-15 o 17 33 40

@Progi1984
Copy link
Member

@dami95 could you give us a file (simple) generated with PowerPoint For Mac 2011 (version 14.0) ?
I need it to analyze differences between PPT2007 & PPT2010.

@dami95
Copy link

dami95 commented Jun 15, 2015

No problem http://grab.by/I4Ko :)

@chuebert
Copy link
Author

no i dont have solve the problem with repair. Do you need the file?

@Progi1984
Copy link
Member

@chuebert I need the file with need of repair, and I need a sample file (with nearly same content) generated by PPT2010.

@dami95 Your link ss just a screenshot : have you got a (simple) PPTX file generated with PowerPoint For Mac 2011 (version 14.0) and the file in error ?

@chuebert
Copy link
Author

@Progi1984
Copy link
Member

@chuebert Thanks for the corrupted. But it's a huge file (hard to find the error). Have you got a short presentation (max. 3 slides) with the problem ? Could you send a sample file (with no error) generated by PPT2010, too ?

@chuebert
Copy link
Author

@Progi1984
Copy link
Member

@chuebert Could you do some Tests ?

Number 1 :
src/PhpPowerpoint/Writer/PowerPoint2007/Slide.php line 870 Replace by :

// Bold
$objWriter->writeAttribute('b', ($element->getFont()->isBold() ? '1' : '0'));

// Italic
$objWriter->writeAttribute('i', ($element->getFont()->isItalic() ? '1' : '0'));

Number 2 :
src/PhpPowerpoint/Writer/PowerPoint2007/Slide.php line 510 & 1021 Replace by :

// a:prstGeom
$objWriter->startElement('a:prstGeom');
$objWriter->writeAttribute('prst', 'rect');
// a:prstGeom\a:avLst
$objWriter->writeElement('a:avLst', null);
// > a:prstGeom
$objWriter->endElement();

Number 3:
src/PhpPowerpoint/Writer/PowerPoint2007/Slide.php line 850 Replace by :

} else {
    $objWriter->writeElement('a:endParaRPr');
}

@rjakes
Copy link

rjakes commented Jun 17, 2015

I'm seeing the same problem with Mac PP 2011. For whatever it's worth, the exact same file opens without problem on Mac PP 2008 and Win PP 2007. I'm happy to help test and debug, if needed.

@Progi1984
Copy link
Member

@rjakes Thanks for your help... We need to find what MacPP2011 doens't like in our PPTX file.

So can you test my previous comment ?

@Progi1984
Copy link
Member

@rjakes @chuebert @dami95 PHPPowerPoint 0.4.0 has been released. I would like to solve your issue for 0.5.0. Could you answer to my question ?

@rjakes
Copy link

rjakes commented Jul 13, 2015

I ran all three tests and got the same results - newer versions of PP complain about the file.

@Progi1984
Copy link
Member

@rjakes Could you send a sample file (with no error) generated by PPT2010, too ? Thanks :)

@steve30000
Copy link

I am having the Require Repair issue as well when opening with Powerpoint 2011 for Mac. I am attaching two small files for comparison. One is the original Powerpoint generated by PHPPresentation and the second is the Powerpoint file after it has been repaired. Thanks.
simple_report_repaired.pptx
simple_report_original.pptx

@Progi1984
Copy link
Member

@steve30000 Hi, could you test some things :

In src/PhpPresentation/Writer/PowerPoint2007/LayoutPack/PackDefault.php, could you replace :
<a:t>?#?</a:t> par <a:t>‹#›</a:t> ?

Warning ! It's not a Less than symbol (or open angled bracket) , it's a Single left-pointing angle quotation.

@adebruyn
Copy link

Hi. I did the modification, but now the PowerPoint file needs to be repaired for the PC version. I've attached simple reports files before and after modification. Not sure it solves the isse for Mac, but it clearly creates a new issue for PC. Thanks for your quick response, though.
report_after_modif.pptx
report_before_modif.pptx

untitled-1

@steve30000
Copy link

It did not solve the issue for the Mac either. Same error message as before about having to remove unreadable content:
screen shot 2015-11-21 at 10 31 22 am

@adebruyn
Copy link

Hi. I just wanted to let you know that, indeed, I screwed up when I tested your solution, and used regular < and > signs. With the correct characters, it opens right up on a PC and Mac without issue.

thsteinmetz added a commit to thsteinmetz/PHPPresentation that referenced this issue Jan 13, 2016
@Progi1984 Progi1984 self-assigned this Jan 17, 2016
@Progi1984
Copy link
Member

@mikestp27
Copy link

I just tested with develop branch with #89 and #167 and I still have the issue (on Mac Office 2016)... I still need the changes to Slide.php that you suggested on June 17: #89 (comment)
What seems to fix the issue for me is the replacement of true/false with 1/0 for bold and italic.

Progi1984 added a commit that referenced this issue Jan 17, 2016
@Progi1984
Copy link
Member

@mikestp27 Bugfix pushed at the moment. Could you test again, please ?

@Progi1984 Progi1984 reopened this Jan 17, 2016
@mikestp27
Copy link

Thank you. With commit f201ae3, it works for me. Tested on Office 2016 and Office 2008 for Mac; and Office 2010 on Windows 7. Before f201ae3, Mac Office 2016 was not working.
f201ae3

@Progi1984
Copy link
Member

Perfect. I close it :)

@vce-wabbott
Copy link

I'm running into the same issue with the current 0.6.0 code. Problem occurs with Mac Powerpoint 2011 and 2016. Example output PPT here - https://drive.google.com/open?id=0B8hTI70phHLQcHNMdEN0WXhIcFE

@Progi1984
Copy link
Member

And with the develop branch ?

@vce-wabbott
Copy link

Sorry I meant to say with the dev branch from 2 weeks ago. I just grabbed the latest dev branch and I still see the error. Example output PPT of the same content here - https://drive.google.com/open?id=0B8hTI70phHLQV0g0ak1CXzR1WTg

@vce-wabbott
Copy link

Any thoughts on what might be causing the problem?

@Progi1984 Progi1984 reopened this Apr 12, 2016
@vce-wabbott
Copy link

Any updates? I'm curious what specifically in the generated output causes the warning.

@Progi1984
Copy link
Member

@vce-wabbot Could you try with reverting this commit f201ae3 ? Thanks

@meriemagg
Copy link

meriemagg commented Sep 29, 2016

i get this error too whenever i try to open the generated pptx with powerpoint 2013 (sorry it's in french)
error-msg
is this bug fixed ?

@Johnfredadams
Copy link

Similar issues here using PHPOffice 0.7.0, and Mac PPT 2016. File is very simple here. File needs repairing, and then some content unreadable.

@santhosh1330
Copy link

Hi, when i tried to open presentation in mac it showing "font calibire is not available and replaced by Trebuchet MS" message is showing. But it is working fine in windows.

@santhosh1330
Copy link

Behieve(2).pptx
This is the file which i generated and showing error for me.

@Progi1984
Copy link
Member

@vce-wabbott Have you got always the problem with latest version of the develop branch ?

CC: @meriemagg (No Problem, I'm french), @Johnfredadams @santhosh1330

@PhDSM
Copy link

PhDSM commented Mar 1, 2017

Hi,
I have the same problem, even using Samples I got the repair issue when opening with PPT 2010 or 2013 (French language version).
I also tried with an empty slide and still got the repair question
Each time the file is correct after repair but the question is really annoying.

With Mac PPT 2011 I get a PPT crash with no message.
I tried both with Master and latest development release
What should I do ?
Regards

GrosGroupe_2017-03-01_14h24.pptx

@GerdonAbbink
Copy link

Hi,

I'd like to know if there is already some kind of update on this issue.
Is the issue being worked on ?

Regards

@Progi1984
Copy link
Member

@Gerdon262 Hi, the project is actually opened to pull request for fixing this issue.

@kailashgajara
Copy link

@Progi1984 Could you please update if the issue is fixed? If yes, is it in master branch or develop?

@Progi1984
Copy link
Member

@kailashgajara The issue is not fixed. We are opened to pull request for fixing this issue.

@neovldz
Copy link

neovldz commented Nov 15, 2017

In case this helps anyone I just noticed something that helped me solve this issue
I was using ->createTextRun($isJV)... $isJV value was empty text (double quote ''), maybe not the best solution but solved it adding a space (' ').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment