diff options
author | Sashi20 | 2020-07-17 15:09:42 +0530 |
---|---|---|
committer | GitHub | 2020-07-17 15:09:42 +0530 |
commit | 229aa1dc453b62d555782a7ca6cd4815646ffb89 (patch) | |
tree | 57b97a28acbafe1583f5437384ff62b20f7c27a1 /pdf | |
parent | 7dc02f15e2bb531e7f446c8ce0656990519f81f3 (diff) | |
parent | 89827712806cc73c12eb364aaf27a7ed5d135950 (diff) | |
download | dwsim_flowsheet-229aa1dc453b62d555782a7ca6cd4815646ffb89.tar.gz dwsim_flowsheet-229aa1dc453b62d555782a7ca6cd4815646ffb89.tar.bz2 dwsim_flowsheet-229aa1dc453b62d555782a7ca6cd4815646ffb89.zip |
Merge pull request #43 from Sashi20/drupal_7.x
Add header to force download
Diffstat (limited to 'pdf')
-rwxr-xr-x | pdf/cert_new.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pdf/cert_new.inc b/pdf/cert_new.inc index dd307e1..702c58a 100755 --- a/pdf/cert_new.inc +++ b/pdf/cert_new.inc @@ -178,8 +178,8 @@ function generate_pdf() header("Content-Transfer-Encoding: binary"); header("Expires: 0"); header("Pragma: no-cache"); - ob_clean(); - flush(); + header('Content-Type: application/force-download'); + $fp = fopen($file, "r"); while (!feof($fp)) { echo fread($fp, 65536); @@ -187,6 +187,8 @@ function generate_pdf() } //!feof($fp) fclose($fp); unlink($file); + ob_clean(); + flush(); //drupal_goto('flowsheeting-project/certificate'); return; } |