Forum How do I...?

Save options for pdf

JorenWillems
Hi

When I create a pdf, it just shows up. I saw also that it is possible to show the popup with the 'Save' and 'Open' options. How can I get this?
Is there also a way to directly save the pdf to a location without opening it?

I use ASP.NET

thx
mikeday
You need to use the "Content-disposition" HTTP header, which allows you to prompt the browser to either save the file or display it inline. As far as I know you cannot make the browser save it automatically without asking the user to confirm, as this would be a security risk.
JorenWillems
Like this?

Response.AddHeader("Content-disposition", "attachment; filename=test.pdf");

Edit: Yes, this is the way to do it!

Problem solved!