I have a memory stream where I put the value of my PDF document.
my code is (in asp.net) will open a page in the browser containing the pdf content. what i want is download the pdf document instead of openning it during the browser
this is my code
// Send PDF to browser
MemoryStream stream = new MemoryStream();
document.Save(stream, false);
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", stream.Length.ToString());
Response.BinaryWrite(stream.ToArray());
Response.Flush();
stream.Close();
Response.End();
can u help me?