summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorSashi202020-07-16 18:14:23 +0530
committerGitHub2020-07-16 18:14:23 +0530
commit76979a5cae89e4d9f6ae5a788e8562f49b813c07 (patch)
tree855117e6fbfd8bcfe41c3cac0ef3ff2c3aefa130 /pdf
parent1fc7a3fa2e9a66c636892083716d0ad2c3a9e67a (diff)
parent8d321a238d07e642966ac3dc904e957d88bc2b11 (diff)
downloaddwsim_flowsheet-76979a5cae89e4d9f6ae5a788e8562f49b813c07.tar.gz
dwsim_flowsheet-76979a5cae89e4d9f6ae5a788e8562f49b813c07.tar.bz2
dwsim_flowsheet-76979a5cae89e4d9f6ae5a788e8562f49b813c07.zip
Merge pull request #41 from Sashi20/drupal_7.x
Modify headers to download flowsheet certificate
Diffstat (limited to 'pdf')
-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)) {