From 795ea89ae026de708705d54763820c8953d9b5c3 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 22 Apr 2005 19:33:56 +0000 Subject: [PATCH] whoops properly name the file on output --- lpdf.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lpdf.php b/lpdf.php index b3daeeb..33cbb9a 100644 --- a/lpdf.php +++ b/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; }