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.
i create mobile application for iPad and with PHPDocX 2.7 createDocxAndDownload working fine.
But with PHPDocX 3.0 this method no working.
I try from device and from browser. Forever create local file, but from device no downloading and from browser downloading empty file... ((
What i doing not right?
Please, help any advice
Hello,
To solve this issue, in file CreateDocx.inc change
line 4285, from:
[quote]header('Content-Length: ' . filesize($fileName));[/quote]
to:
[quote]header('Content-Length: ' . filesize($fileName . '.' .
$this->_extension));[/quote]
We're finishing a new version with this bug solved and some other improvements and new features.
Regards.
Gracias!
This line is at No. 4392
I tried change - it does not work
but if you comment out this line - works
When do you plan to release the next version ?
Hello,
The next week.
Regards.
I tried with PHPDocX 3.1 (pro) version and same issue; it’s not fixed yet.
Thanks, pphornet
Hello,
This line:
header(
'Content-Disposition: attachment; filename="' . $fileNameDownload .
'.' . $this->_extension . '"'
);
has been fixed in the latest version.
Please note that PHPDocX has createDocxAndDownload method to allow the download of the document. But of course, the headers that this method uses depend on your server. We added createDocxAndDownload but if this method doesn't work in your server you can use createDocx and the add a few lines to download the document.
For example if you integrate PHPDocX in Drupal we don't recommend you to use createDocxAndDownload but the included functions in this CMS.
Regards.