Docx generated from template corrupted with LibreOffice 24 #2709
Labels
Bug Report
Status: Waiting for feedback
Question has been asked, waiting for response from PR author
Describe the bug and add attachments
Hello and thank you for creating and maintaining this library !
I face a problem with docx generated from template using PHPWord : it opens correctly with LibreOffice 7, but is considered corrupted with LibreOffice 24.
🔴 LibreOffice 24 version details :
✅ LibreOffice 7 version details :
Expected behavior
I expect a docx generated from a template using PHPWord to be properly formatted for LibreOffice >=24.
Steps to reproduce
Hello ${toto} !
toto
:$templateProcessor->setValue('toto', 'titi');
BinaryFileResponse
of yourendpoint
Hello ${toto} !
)Hello titi !
)I have also noticed that if you open the file with LibreOffice 7, save it, and then open it with LibreOffice 24, the file will display correctly.
LibreOffice 7 seem to fix the file.
If you change the file extension into
zip
and search for differences between a never opened file and a saved with LibreOffice 7 file, you will notice several changes, particularly in theword/document.xml
.PHPWord version(s) where the bug happened
1.3.0
PHP version(s) where the bug happened
8.2
Priority
The text was updated successfully, but these errors were encountered: