Phpdocx word documents are corrupt when adding images

孤者浪人 提交于 2019-12-11 09:19:14

问题


I'm using Phpdocx 2.5 to convert html to docx. I'm using the embedHTML method with 'downloadImages' parameter set to true; When the html doesn't contain any images, document is generated just fine. When images are added, the resulting document seems to be corrupt. The details of the errors show a standard "File is corrupt and cannot be opened" message. However, Word also displays a "Do you want to recover the content" message which if clicked, displays the content (with images) which look just fine. Basically the content seems to be rendered correctly but there is an issue somewhere that causes Word to see the document as corrupted. Anyone had this problem or can you give me any ideas how to solve this?

Thanks in advance.

来源:https://stackoverflow.com/questions/16341655/phpdocx-word-documents-are-corrupt-when-adding-images

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!