forked from science-ation/science-ation
whoops properly name the file on output
This commit is contained in:
parent
53e8ca4f93
commit
795ea89ae0
6
lpdf.php
6
lpdf.php
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user