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

Generated pptx file opened with errorin Office Powerpoint #100

Closed
girard-g opened this issue May 7, 2015 · 20 comments
Closed

Generated pptx file opened with errorin Office Powerpoint #100

girard-g opened this issue May 7, 2015 · 20 comments
Assignees
Milestone

Comments

@girard-g
Copy link

girard-g commented May 7, 2015

Hi,
I've got the same problem (#47) but I have the new version with the 2 patches included.. It don't fix anything for me.

It is only on Microsoft Powerpoint ( i've only tested on 2013 version), it work fine with Openoffice and Libreoffice.

I don't know how to fix it

Thanks for your time !
Evergreenn

@Progi1984
Copy link
Member

@evergreenn Have you a code for generated a "corrupted" file ? Because with my 2007 version, I have no problem.

@rodge025
Copy link

also me,,im using the 2007 microsoft powerpoint and i got the same pop up
error,please reply

On Wed, Jun 24, 2015 at 8:51 PM, Kevin Paul Kalis [email protected]
wrote:

I've got the same problem. Using powerpoint 2007


Reply to this email directly or view it on GitHub
#100 (comment)
.

@girard-g
Copy link
Author

Hi, check all your fields, Microsoft Office don't like empty text field. I works for me..

@rocity
Copy link

rocity commented Jun 25, 2015

ohh i see. i will try your suggestion.

@rocity
Copy link

rocity commented Jun 25, 2015

@evergreenn still doesn't work.. im still getting erros when opening the power point

@girard-g
Copy link
Author

Hmm.. maybe a picture not found ?

@rodge025
Copy link

@evergreenn what version are you using phppowerpoint?

On Wed, Jun 24, 2015 at 11:14 PM, Evergreenn [email protected]
wrote:

Hmm.. maybe a picture not found ?


Reply to this email directly or view it on GitHub
#100 (comment)
.

@Progi1984
Copy link
Member

@domondon1 @evergreenn @rocity Could you look at this comment : #89 (comment) ? And give me some feedback. Thanks :)

@Progi1984
Copy link
Member

@domondon1 @evergreenn @rocity PHPPowerPoint 0.4.0 has been released. I would like to solve your issue for 0.5.0. Could you answer to my question ?

@rodge025
Copy link

i have a question @Progi1984 I open the ppt file on microsoft powerpoint 2007 and its working fine,but when i open the ppt file on microsoft powerpoint 2010,there is a pop up saying "repair"

@rocity
Copy link

rocity commented Jul 13, 2015

Mine is a bit strange. working on 2007 after applying what @evergreenn has told me it still doesn't fix the repair error in 2013.

@Progi1984 #89 has also been applied. Still getting error in 2013

@Progi1984
Copy link
Member

@domondon1 Warning ! You talk about PPT file and not PPTX file.

@domondon1 @rocity Could you validate your files with OpenXML Validator ?
You can change the validator format.

image

If errors, could you send me your files ?

@jqr108
Copy link

jqr108 commented Sep 15, 2015

Hi @Progi1984 @domondon1 @rocity

Wanted to let you all know I ran into a similar issue. PPTX files needed repair, and but when repaired none of my charts would show up. I managed to fix this by checking out the XML tool above. The issue I was having was, to paraphrase the XML tool (sorry can't copy from it):

"Invalid child element 'chart:strLit", only "chart:numLit' and 'chart:numRef' supported."

My quick fix was to make sure to intval() or floatval() all data passed to the Chart Series. Looks like the code at issue here is on line /Writer/PowerPoint2007/Chart.php.

Not sure if this is the same issue others are having but I thought I would share!

@RightHandedMonkey
Copy link

Question: Were you getting this issue intermittently?

I don't see how this could be the same as my issue because sometimes I'll get the error and but most times I won't. I'm having issues where the same code being output the majority of the time works, but some times the corrupt file message occurs and I'll have a missing image or a missing slide.

Here is my issue:
#132

@Progi1984
Copy link
Member

@evergreenn @rocity @domondon1 @jqr108 @RightHandedMonkey Could you test with the latest version of the develop branch (with #89 & PR #167) ?

@Progi1984
Copy link
Member

@evergreenn @rocity @domondon1 @jqr108 @RightHandedMonkey PHPPowerPoint 0.6.0 has been released. I would like to solve your issue for 0.7.0. Could you test the last develop version ?

@girard-g
Copy link
Author

girard-g commented Feb 5, 2016

@Progi1984 Yes ! All seems to be good for me, thanks a lot ! I will close the issue ;)

@Progi1984 Progi1984 self-assigned this Feb 5, 2016
@Progi1984 Progi1984 modified the milestones: 0.7.0, Waiting For Answer Feb 5, 2016
@meriemagg
Copy link

meriemagg commented Oct 2, 2016

@evergreenn HI i have the same issue with powerpoint 2013 could you tell me please how you solved the problem ? i am using theb 0.7.0 version

@Riaz1
Copy link

Riaz1 commented Oct 6, 2016

I am having the same issue, code to recreate error:

require_once 'vendor/autoload.php';

use PhpOffice\PhpPresentation\PhpPresentation;
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Style\Color;
use PhpOffice\PhpPresentation\Style\Alignment;

$objPHPPowerPoint = new PhpPresentation();

// Create slide
$currentSlide = $objPHPPowerPoint->getActiveSlide();

// Create a shape (text)
$shape = $currentSlide->createRichTextShape()
->setHeight(300)
->setWidth(600)
->setOffsetX(170)
->setOffsetY(180);
$shape->getActiveParagraph()->getAlignment()->setHorizontal( Alignment::HORIZONTAL_CENTER );
$textRun = $shape->createTextRun('Thank you for using PHPPresentation!');
$textRun->getFont()->setBold(true)
->setSize(60)
->setColor( new Color( 'FFE06B20' ) );

// Create slide
$currentSlide1 = $objPHPPowerPoint->createSlide();

// Create a shape (text)
$shape1 = $currentSlide1->createRichTextShape()
->setHeight(300)
->setWidth(600)
->setOffsetX(170)
->setOffsetY(180);
$shape1->getActiveParagraph()->getAlignment()->setHorizontal( Alignment::HORIZONTAL_CENTER );
$textRun1 = $shape1->createTextRun('Thank you for using PHPPresentation!');
$textRun1->getFont()->setBold(true)
->setSize(60)
->setColor( new Color( 'FFE06B20' ) );

$oWriterODP = IOFactory::createWriter($objPHPPowerPoint, 'ODPresentation');
$oWriterODP->save(DIR . "/t1.odp");


The code below does not create an error:

require_once 'vendor/autoload.php';

use PhpOffice\PhpPresentation\PhpPresentation;
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Style\Color;
use PhpOffice\PhpPresentation\Style\Alignment;

$objPHPPowerPoint = new PhpPresentation();

// Create slide
$currentSlide = $objPHPPowerPoint->getActiveSlide();

// Create a shape (text)
$shape = $currentSlide->createRichTextShape()
->setHeight(300)
->setWidth(600)
->setOffsetX(170)
->setOffsetY(180);
$shape->getActiveParagraph()->getAlignment()->setHorizontal( Alignment::HORIZONTAL_CENTER );
$textRun = $shape->createTextRun('Thank you for using PHPPresentation!');
$textRun->getFont()->setBold(true)
->setSize(60)
->setColor( new Color( 'FFE06B20' ) );

$oWriterODP = IOFactory::createWriter($objPHPPowerPoint, 'ODPresentation');
$oWriterODP->save(DIR . "/t1.odp");


Microsoft Powerpoint is able to open and repair the 'corrupt' file.

@Progi1984
Copy link
Member

@Riaz1 You try to create an ODP file, not a PPTX.

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

No branches or pull requests

8 participants