![]() |
|
#1
|
|||
|
|||
|
Hi,
I'm trying to password protect some PDF files and I thought I would go about it this way: PHP Code: That worked great in my primary web browser, but I checked it in Firefox which didn't have the Adobe Reader plugin installed and I ran into a problem. It wanted to download the file, but with a .php extension. The file downloaded fine and would have displayed had I changed the extension from .php to .pdf I put in: PHP Code: header('Content-Disposition: attachment; filename="file.pdf"'); to solve the problem, but now it downloads on browsers that have the plugin installed as well. This isn't a huge problem, but I would prefer (for the user's convenience) that the file would open up in-browser if possible. I don't know how I could fix this besides only including the Content-Disposition if the user had the plugin installed, but I couldn't find a way to check that. Any suggestions or do you think I should just let everyone download the files to the desktop before viewing them? P.S. I hope this makes sense. Let me know if I need to clarify. |