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

First argument for Slide::setSlideLayout() is false #824

Open
tognee opened this issue Oct 10, 2024 · 2 comments
Open

First argument for Slide::setSlideLayout() is false #824

tognee opened this issue Oct 10, 2024 · 2 comments
Assignees

Comments

@tognee
Copy link

tognee commented Oct 10, 2024

I can't load a pptx file

I'm getting this error:

PhpOffice\PhpPresentation\Slide::setSlideLayout(): Argument #1 ($layout) must be of type PhpOffice\PhpPresentation\Slide\SlideLayout, false given, called in vendor/phpoffice/phppresentation/src/PhpPresentation/Slide.php on line 84

My code:

$presentation = IOFactory::load($filePath);

The file I'm using:
This file converted to pptx using LibreOffice 24.2.6.2

@Progi1984 Progi1984 self-assigned this Feb 11, 2025
@Progi1984
Copy link
Member

Hi @tognee,

I have converted your file with LibreOffice in a PPTX file.

After that, I have loaded with IOFactory::load($filePath); => No error on my side.

Have you got more informations ?

@tognee
Copy link
Author

tognee commented Feb 26, 2025

The version of the library I'm using is:
"phpoffice/phppresentation": "dev-master"

I've retried converting the file linked above using LibreOffice 24.8.4.2, here's the file I got.
document.pptx

I've tried parsing it again and seeing the same issue.

OS: Fedora Linux 41 (Workstation Edition)
PHP: 8.3.16
Composer version: 2.8.4

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

No branches or pull requests

2 participants