diff options
-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; } |