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 admin  · 18-12-2017 - 08:01

Hello,

We move your request to the dev team to write a new article for the cookbook (https://www.phpdocx.com/documentation/cookbook/).

If you get a generic error such as 'Unexpected token P in JSON at position 0' is because the stream output is not being handled correctly by your JS, for example, it's not being readed as a binary content. Maybe the easiest solution for your project would be using a library such as jquery-binarytransport (https://github.com/henrya/js-jquery/tree/master/BinaryTransport).

Regards.