You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.7
Calc: threaded
Expected behavior
I expect a docx generated from a template using PHPWord to be properly formatted for LibreOffice >=24.
Steps to reproduce
create a simple docx template, for example containing only the paragraph Hello ${toto} !
process this template and set a value for toto : $templateProcessor->setValue('toto', 'titi');
save processed template as docx and send it in the BinaryFileResponse of your endpoint
open the downloaded docx with LibreOffice 24 : the file is corrupted, var are not translated (file still contains Hello ${toto} !)
open the downloaded docx with LibreOffice 7 : the file opens correctly, var are translated (file contains 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 the word/document.xml.
PHPWord version(s) where the bug happened
1.3.0
PHP version(s) where the bug happened
8.2
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)
The text was updated successfully, but these errors were encountered:
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: