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.
Hello,
There's no method to merge and download. But it's very easy to do with a few headers, for example these are the headers used in the createDocxAndDownload method:
header(
'Content-Type: application/vnd.openxmlformats-officedocument.' .
'wordprocessingml.document'
);
header(
'Content-Disposition: attachment; filename="' . $fileNameDownload .
'.' . $this->_extension . '"'
);
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($fileName . '.' . $this->_extension));
readfile($fileName . '.' . $this->_extension);
You just need to change the file path and add it to your code. Just remember you can't print anything before a PHP header.
Regards.