-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Describe the Bug
Hello,
If you load a ODText document and try to create another one with createWriter method but pass the loaded document into it, and if the loaded .odt document contains sections with ListItem/ListItemRun elements those are not getting added to the new created document.
Regards,
Alexe
Steps to Reproduce
-
Create a document and insert a list into it
-
Load ODText document.
$document = \PhpOffice\PhpWord\IOFactory::load("document-x", 'ODText');
- Create a writer, save it and download it.
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($document, 'ODText');
$objWriter->save(storage_path('newDocument.odt'));
return response()->download(storage_path("newDocument.odt"));
Expected Behavior
I was expected that the downloaded document was the same as the loaded one.
Current Behavior
The list is missing from the downloaded document.
Context
Please fill in your environment information:
- PHP Version: 8.0.10
- PHPWord Version: ^0.18.2