View PDF in browser but save with wrong file name

I have a form where, when the user clicks the download button, the get_file.php script returns the specified php file. In ffx, when I disable the adobe plugin, a download window will appear with the correct file name. In IE8, for some reason I cannot disable the adobe plugin, so it always opens in the browser. This works fine, however, in both ffx and IE8, when I click the save button on the adobe toolbar, I get the wrong file name. I get get_file.pdf.

I am using adobe reader 8.

These are the headers I set:

header("Cache-Control: private"); header("Pragma:"); header("Content-type: application/pdf"); header("Content-Disposition: inline; filename=$pdfFileName"); 

Thanks!

+6
firefox internet-explorer pdf adobe-reader
source share
3 answers

Setting the pdf file name is quite complicated. It depends on what you need / environment.
Some time ago I wrote a short document on this topic. Hope this can be helpful for you. https://docs.google.com/View?docid=dchmct9k_9dxkdwk

+2
source share

Instead of "Content-Disposition: inline; try "Content-Disposition: attachment; .

0
source share

Just add the file name at the end of the url, it works fine for me

eg:

 get_file.php/Myfilename.pdf 
0
source share

All Articles