EDN Admin
Well-known member
Hi All,
Unable to open pdf only in IE9(works in IE8/IE10/Chrome/Firefox).
Here is the code snippet I have used,
response.Clear();
response.ClearHeaders();
response.ClearContent();
response.Buffer = true;
response.AddHeader("Content-Disposition", "attachment; filename="+ id +"_PD.pdf; size= " + pdf.Length.ToString());
/*response.ContentType = "application/pdf";*/
response.ContentType = "application/octet-stream";
response.AppendHeader("Content-Length", pdf.Length.ToString());
response.AddHeader("Cache-Control", "public, max-age=1800");
response.AppendHeader("Accept-Ranges", "none");
response.Expires = -1;
response.Charset = string.Empty;
response.BinaryWrite(pdf);
response.End();
Thanks,
Prashanth
Kaluvalakp
View the full article
Unable to open pdf only in IE9(works in IE8/IE10/Chrome/Firefox).
Here is the code snippet I have used,
response.Clear();
response.ClearHeaders();
response.ClearContent();
response.Buffer = true;
response.AddHeader("Content-Disposition", "attachment; filename="+ id +"_PD.pdf; size= " + pdf.Length.ToString());
/*response.ContentType = "application/pdf";*/
response.ContentType = "application/octet-stream";
response.AppendHeader("Content-Length", pdf.Length.ToString());
response.AddHeader("Cache-Control", "public, max-age=1800");
response.AppendHeader("Accept-Ranges", "none");
response.Expires = -1;
response.Charset = string.Empty;
response.BinaryWrite(pdf);
response.End();
Thanks,
Prashanth
Kaluvalakp
View the full article