tags:

views:

7

answers:

1

I am rendering a PDF correctly using SSRS SDK for PHP, and it is being displayed in viewer correctly. But, when I click the save button on the Adobe Reader, the dialog box shows the name of the source files name rather then the name I pass in via HTTP Header. here is my code:

header('Content-Type: application/pdf; filename="'.basename($reportName).'";'); header('Content-Disposition: inline; filename="'.basename($reportName).'";');

header("Content-length: ".(string)(strlen($result))); header("Expires: ".gmdate("D, d M Y H:i:s", mktime(date("H")+2, date("i"), date("s"), date("m"), date("d"), date("Y")))." GMT");

header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("cache-control: max-age=1");

A: 

Found solution. Tested in Chrome, Safari, IE8, IE7, IE6 Add the filename to end of URL

ex:

ShowPDF.php/Myfilename.pdf

Larry