Forum


Replies: 6   Views: 2884
Createdocx::$streammode creates a corrupt 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 sam3d  · 17-12-2017 - 18:48

Thank you. We appreciate your patience. 

Adding an exit() call at the end of the simple form handler above solves the corrupted file issue. 

Is it possible you could share a simple ajax example? 

When we use ajax, the document is sent as part of the response ( it appears in the browser console ) and is not downloaded.  And we get a jquery error: 

SyntaxError: Unexpected token P in JSON at position 0