ListItem object doesn't get added to ODText document #2159
Labels
Bug Report
Open Document (ODT)
Status: Waiting for feedback
Question has been asked, waiting for response from PR author
Milestone
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');
$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:
The text was updated successfully, but these errors were encountered: