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

getSlideLayout() always returns BLANK on any opened PPTX file #144

Closed
tsanami69 opened this issue Nov 9, 2015 · 15 comments
Closed

getSlideLayout() always returns BLANK on any opened PPTX file #144

tsanami69 opened this issue Nov 9, 2015 · 15 comments

Comments

@tsanami69
Copy link

I have tried this on numerous pptx files...
every file I open using:

define('pptxLib', 'thefile.pptx');
$oReaderPPT = IOFactory::createReader('PowerPoint2007');    
$oname = __DIR__."/slides/".pptxLib;
$r = $oReaderPPT->load($oname); 
$r->setActiveSlideIndex(0);
$slide = $r->getActiveSlide();
$slideLayout = $slide->getSlideLayout();

$slideLayout always returns BLANK, but the same file when opened in PowerPoint 2010 has every slide with the correct layout.

Is this a bug or a known issues?
Thanks

@Progi1984
Copy link
Member

@tsanami69 Could you test the PR #162 ?

@tsanami69
Copy link
Author

Thank you for this.
OK, I've updated the revised files and ran a test...
It now gets the slide layouts BUT seems to return Blank when a slide has a 'Title Only' layout on some pptx files and on others it sets it as 'Two Content'...

@Progi1984
Copy link
Member

@tsanami69 Could you link the file for test ?

@tsanami69
Copy link
Author

This is the file I'm extracting slides from: www.e-magineda.co.uk/PHPPresentation/myTest/slides/CV8.pptx

This is the file I'm using as the template: www.e-magineda.co.uk/PHPPresentation/myTest/slides/design.pptx

This is the resulting/compiled file: www.e-magineda.co.uk/PHPPresentation/myTest/created/compiled13_02_31.pptx

@Progi1984
Copy link
Member

@tsanami69 I try to read CV8.pptx with the Sample 12 (PowerPoint2007). I have not found any slide with template "Blank" or "Title Only", just only Layout::TWO_CONTENT & Layout::TITLE_AND_CONTENT & Layout::COMPARISON, and so on.

Could you give me the number of slide, the expected value of template and the returned value ?

@tsanami69
Copy link
Author

Hi,
CV8.pptx is the origin file that I used to insert slides into the complied13_02_31.pptx.
If you take slide 2 in CV8 the layout is Title Only, but when it's inserted into the compiled file it becomes Two Content...

@Progi1984
Copy link
Member

Note for me : Use code from PhpPresentation/Writer/PowerPoint2007/LayoutPack/TemplateBased.php for extracting layouts and not use the PackDefault

@tsanami69
Copy link
Author

OK, I tried that and YES it is now picking up the correct Layouts...
Next issue is formatting of content is not correct from the slide master (font sizes etc).
Thanks for your help

@Tchesco101
Copy link

I am having the same problem as the code would be in this case?

@Progi1984 Progi1984 reopened this Dec 10, 2015
@Progi1984
Copy link
Member

@tsanami69 I have not yet developed the complete feature ? What have you done ?

@Progi1984
Copy link
Member

@tsanami69 I updated the PR #162. Could you test it ?

@Progi1984
Copy link
Member

@tsanami69 : Some news ?

@Progi1984
Copy link
Member

@tsanami69 : Have you got time for testing the Pull Request before integration in develop branch ? Thanks for your feedback.

1 similar comment
@Progi1984
Copy link
Member

@tsanami69 : Have you got time for testing the Pull Request before integration in develop branch ? Thanks for your feedback.

@tsanami69
Copy link
Author

HI, sorry for the delay in responding...I have checked this and it now works fine.

Progi1984 added a commit that referenced this issue Jan 21, 2016
#144 : PowerPoint2007 Reader : Support for Layout Name
@Progi1984 Progi1984 added this to the 0.6.0 milestone Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants