summaryrefslogtreecommitdiff
path: root/pdf/cert_new.inc
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/cert_new.inc')
-rwxr-xr-xpdf/cert_new.inc15
1 files changed, 7 insertions, 8 deletions
diff --git a/pdf/cert_new.inc b/pdf/cert_new.inc
index 8096a5d..d01d724 100755
--- a/pdf/cert_new.inc
+++ b/pdf/cert_new.inc
@@ -170,21 +170,20 @@ function generate_pdf()
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
- header("Content-Disposition: attachment; filename=" . $filename);
- header("Content-Type: application/pdf");
header("Content-Description: File Transfer");
+ header("Content-Type: application/pdf");
+ header("Content-Disposition: attachment; filename=" . $filename);
header("Content-Length: " . filesize($file));
- header("Content-Transfer-Encoding: Binary");
+ header("Content-Transfer-Encoding: binary");
header("Expires: 0");
header("Pragma: no-cache");
- header('Content-Type: application/force-download');
-
- $fp = fopen($file, "r");
- ob_clean();
flush();
+ $fp = fopen($file, "r");
while (!feof($fp)) {
- echo fread($fp, filesize($file));
+ echo fread($fp, 65536);
flush();
+ ob_end_flush();
+ ob_clean();
} //!feof($fp)
fclose($fp);
unlink($file);