how to display a field in pdf file using datareader

Posted by Klbaiju under ASP.NET on 9/1/2012 | Points: 10 | Views : 1669 | Status : [Member] | Replies : 0
Hi,

In my application iam using pdf file.

pdf file is stored as binary in database. i convert that into pdf file.

on the load event pdf file will open like this code

SqlDataAdapter da = new SqlDataAdapter("select * from downloads where id=93 ", con);
DataSet ds = new DataSet();
da.Fill(ds);
Byte[] bytes = (Byte[])ds.Tables[0].Rows[0]["downloads"];
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = ds.Tables[0].Rows[0]["filename"].ToString();
Response.AddHeader("content-disposition", "attachment;filename=" + ds.Tables[0].Rows[0]["filename"].ToString());
Response.BinaryWrite(bytes);
Response.Flush();
Response.End();

it is working fine;

in the pdf there are textboxes

i want to display a field in pdf file from data base using datareader.

how it is possible

Regards

Baiju




Responses

(No response found.)

Login to post response