1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Length", pdfStream.Count.ToString());
//Response.BufferOutput = true;
//Response.AddHeader("Cache-Control", "private");
//Response.Flush();
//
Response.Expires = -1;
Response.Cache.SetNoStore();
Response.ContentType = "application/pdf";
Response.AppendHeader("Pragma", "no-cache");
Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename);
Response.OutputStream.Write(pdfStream.ToArray(), 0, pdfStream.Count);
Response.Flush();
Response.Close();
Response.End(); |
Partager