Forum


Replies: 1   Views: 3154
Word complains that i have a corrupted docx file
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 05-10-2017 - 18:33

Hello,

The most common problem when getting a corrupted DOCX is that your server is not returning a correct mime type or your server is adding information to the document.

Please check the documentation available about how to download a DOCX file using phpdocx:

https://www.phpdocx.com/documentation/cookbook/download-generated-docx

phpdocx includes a createDocxAndDownload method to generate and download the documents, and you can try the alternative code available on the previous page. Premium licenses also include a stream mode to download the DOCX directly without saving the document to the filesystem.

And also please check this recent issue and how it was resolved:

https://www.phpdocx.com/en/forum/default/topic/1463

Regards.