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

IOFactory::Load fails with "Cannot add Title in Header." #2616

Open
2 tasks
WalidAxo opened this issue May 29, 2024 · 0 comments
Open
2 tasks

IOFactory::Load fails with "Cannot add Title in Header." #2616

WalidAxo opened this issue May 29, 2024 · 0 comments

Comments

@WalidAxo
Copy link

Describe the bug and add attachments

Hi,
I'm trying to read a docx file with the following code :
$reader = IOFactory::createReader('Word2007');
$phpWord = $reader->load($copyFilePath);
$documentW = $phpWord->getSections();
I'm getting a bizarre behaviour from the "load" method saying ""Cannot add Title in Header."
I'm sure that my files is correct. I can open it on word, google doc, pages (macOS) and it's not corrupted.

I can't post the document here because it's confidential.
Capture d’écran 2024-05-29 à 11 07 40
Thank you for your help !
Best regards,

Expected behavior

The docx file should be loaded correctly. The error message is not clear on wha't wrong.

Steps to reproduce

I used the following code
$reader = IOFactory::createReader('Word2007');
$phpWord = $reader->load($copyFilePath);
$documentW = $phpWord->getSections();

PHPWord version(s) where the bug happened

1.2

PHP version(s) where the bug happened

8.0.30

Priority

  • I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant