I have url to PDF file. I need to have a link on the page so that when the user clicks the link, they see the "Save As" dialog.
I found a solution using an iframe, but if the user has installed a PDF plugin, the "Save As" dialog does not show up.
Is there any other way to show the user the "Save As" dialog?
Sorry, I forgot to mention that after user will click on link, request will be sent by ajax. It will be post request for a PDF file url. In the result of this request I will know there is PDF file is located, and now I would like to show the user Save as dialog instead of opening it in browser.
header()answer in there?Content-Disposition: attachmentheader, whether added by Apache or PHP, tells the browser what you want it to do (show a "Save As" dialog rather than presenting the PDF inline). Whether it does it is up to the browser, but in my experience they do.