Hello,
When you use the streamMode option (to avoid generating DOCX files in the fs) you need to use the createDocx method to generate the stream content. You can't use the createDocxAndDownload with the streamMode option, as the method uses PHP headers to download a DOCX file not a stream.
Please check the included samples in the package and the examples and information available on:
https://www.phpdocx.com/api-documentation/performance/zip-stream-docx-with-PHP
https://www.phpdocx.com/documentation/cookbook/improve-phpdocx-performance
Please enable the streamMode option and then use the createDocx method to generate the stream using PHP or Ajax.
Regards.