diff options
author | Sashi20 | 2020-07-17 15:08:51 +0530 |
---|---|---|
committer | Sashi20 | 2020-07-17 15:08:51 +0530 |
commit | 89827712806cc73c12eb364aaf27a7ed5d135950 (patch) | |
tree | 57b97a28acbafe1583f5437384ff62b20f7c27a1 /pdf/cert_new.inc | |
parent | 5c4b58d9a7bb78a8097c0f0680f2ee66c29d41c6 (diff) | |
download | dwsim_flowsheet-89827712806cc73c12eb364aaf27a7ed5d135950.tar.gz dwsim_flowsheet-89827712806cc73c12eb364aaf27a7ed5d135950.tar.bz2 dwsim_flowsheet-89827712806cc73c12eb364aaf27a7ed5d135950.zip |
Add header to force download
Diffstat (limited to 'pdf/cert_new.inc')
-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; } |