|
Hi Faiz,
Please use the below code to restore pdf file from binary data.
string strExtenstion = “.pdf”;
byte[] bytFile = GetBinaryDataFromDataBase();// “Byte array retrieved from database”;
Response.Clear();
Response.Buffer = true;
Response.ContentType = “application/pdf”;
Response.AddHeader(“content-disposition”,“attachment;filename=Tr.pdf”);
Response.Charset = “”;
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.BinaryWrite(bytFile);
Response.End();
Hope this will help.
|