summaryrefslogtreecommitdiff
path: root/pdf/cert_new.inc
diff options
context:
space:
mode:
authorSashi202020-07-17 15:08:51 +0530
committerSashi202020-07-17 15:08:51 +0530
commit89827712806cc73c12eb364aaf27a7ed5d135950 (patch)
tree57b97a28acbafe1583f5437384ff62b20f7c27a1 /pdf/cert_new.inc
parent5c4b58d9a7bb78a8097c0f0680f2ee66c29d41c6 (diff)
downloaddwsim_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-xpdf/cert_new.inc6
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;
}