-
Notifications
You must be signed in to change notification settings - Fork 2.7k
IOFactory::Load fails with "Cannot add Title in Header." #2616
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
Labels
Milestone
Comments
@WalidAxo Hi, Could you give me a simple file, please ? |
Does anyone give any feedback or solutions of this? I've also faced this same problem. here is my code example: $phpWord = IOFactory::load($filePath); |
@mishajib Hi, Could you give me a sample file, please ? |
here is the sample file. @Progi1984 Thanks |
4 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

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
The text was updated successfully, but these errors were encountered: