summaryrefslogtreecommitdiff
path: root/pdf/cert_new.inc
diff options
context:
space:
mode:
authorSashi202020-07-16 18:12:35 +0530
committerSashi202020-07-16 18:12:35 +0530
commit8d321a238d07e642966ac3dc904e957d88bc2b11 (patch)
tree855117e6fbfd8bcfe41c3cac0ef3ff2c3aefa130 /pdf/cert_new.inc
parent157d1da21a85512b737737ef152c8e2f88e45fad (diff)
downloaddwsim_flowsheet-8d321a238d07e642966ac3dc904e957d88bc2b11.tar.gz
dwsim_flowsheet-8d321a238d07e642966ac3dc904e957d88bc2b11.tar.bz2
dwsim_flowsheet-8d321a238d07e642966ac3dc904e957d88bc2b11.zip
Modify headers to download flowsheet certificate
Diffstat (limited to 'pdf/cert_new.inc')
-rwxr-xr-xpdf/cert_new.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/pdf/cert_new.inc b/pdf/cert_new.inc
index 19b64bb..cca67e7 100755
--- a/pdf/cert_new.inc
+++ b/pdf/cert_new.inc
@@ -165,12 +165,21 @@ function generate_pdf()
$filename = str_replace(' ', '-', $data3->contributor_name) . '-DWSIM-Flowsheet-Certificate.pdf';
$file = $path . '/pdf/temp_certificate/' . $proposal_id . '_' . $filename;
$pdf->Output($file, 'F');
+ ob_clean();
+ header("Pragma: public");
+ header("Expires: 0");
+ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+ header("Cache-Control: public");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . $filename);
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");
header("Content-Length: " . filesize($file));
+ header("Content-Transfer-Encoding: binary");
+ header("Expires: 0");
+ header("Pragma: no-cache");
+ ob_clean();
flush();
$fp = fopen($file, "r");
while (!feof($fp)) {