I have a website with links to PDF files. When a user clicks on the link, it should open the PDF in the browser.
But when the user clicks on the save button, I want a different name to be populated by default in the "Save As" dialog box.
Currently, it gives the entire URL (with some characters like : and / replaced by _) as the default file name.
Below is the code snippet I am using:
However, if I set the content-disposition to attachment, it pops up a dialog box with the name that I want to save. Here, if I click on Open it opens the PDF and then on trying to save the name that I want is shown by default.
Is there any other header that I need to set so that it works in the inline mode ?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to set the default file name shown when trying to save PDF opened in inline view from browser ?