whoops properly name the file on output

This commit is contained in:
james 2005-04-22 19:33:56 +00:00
parent 53e8ca4f93
commit 795ea89ae0

View File

@ -520,8 +520,12 @@ class lpdf
pdf_close($this->pdf);
$pdfdata=pdf_get_buffer($this->pdf);
$filename=strtolower($this->page_subheader);
$filename=ereg_replace("[^a-z0-9]","_",$filename);
header("Content-type: application/pdf");
header("Content-disposition: inline; filename=sfiab_".$this->page_subtitle.".pdf");
header("Content-disposition: inline; filename=sfiab_".$filename.".pdf");
header("Content-length: ".strlen($pdfdata));
echo $pdfdata;
}