If you set the Content-Disposition header using "inline" instead of "attachment" the browser will open the document and show it. Of course, the client machine will have to have the appropriate application fo r showing the content.
IE: If you send a PDF and the user doesn't have a PDF viewer on their machine, they will be presented with the "download/open with" box.
correct. It will open inside the browser if there's a registered plugin for it. You have no control over that. And a good thing it is, if a website could launch applications at will on a client computer it could install any software it wanted on that computer. The consequences would be disastrous. Noone would be able to visit any website as doing so would leave them wide open to virusses, spyware, and a host of other baddies.
subject: How to avoid open/Save dialog box while downloading?