Forum


Replies: 1   Views: 1422
Corrupt docx after phpdocx upgrade
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 netsolution  · 26-08-2020 - 14:32

Hi,

I tried to replace my current version (think it is 7.5) with version 10, but the docx documents created afterwards are corrupt and can not be opened with Word.

No php errors are logged.

I just replaced the files/folders (kept the config folder), and changed the includes from ".inc" to ".php" in my script.

Is there anything else that I have to change in my script to keep it compatible with the new version?

Thanks.

Posted by admin  · 26-08-2020 - 15:02

Hello,

All code that works with phpdocx 7.5 should work with phpdocx 10 (changing INC extensions to PHP extensions to include the library), as they use the same API (adding new options, methods and features).

Please send to contact[at]phpdocx.com one of the corrupted DOCX you get; and also run some of the included samples to check if they are generated correctly. In most cases, a corrupt DOCX comes from adding extra information when the document is downloaded: https://www.phpdocx.com/documentation/cookbook/corrupted-docx

Regards.