Knowledge Transfer

Monday, May 12, 2008

Open the PDF File in ASP.Net

Read PDF File With in ASp.Net

private void ReadPdfFile()
{
string path = @"C:\uday.pdf";
WebClient client = new WebClient();
Byte[] buffer = client.DownloadData(path);

if (buffer != null)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length",buffer.Length.ToString());
Response.BinaryWrite(buffer);
}

}

Happy Coding

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home