.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson
Eminent IT

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

PDF Reader Control

Posted By: Ruchi     Posted Date: February 15, 2009    Points:2   Category :ASP.Net
How can i use PDF reader control in asp.net?

Author: Pankaj Mishra             
Posted Date: February 15, 2009     Points: 5   

Hi Ruchi,
Sorry not clear with your question.Do you want to open .PDF file in web browser? If yes then just you need to give path of the .PDF file and if the browser is enable and acrobat reader is install in client machine then it will open .pdf file in the browser itself.


Response.Redirect(@"c:\Doc\myFIle.pdf"); // or you can give relative path

Hope i understood your question.

Author: shahin             
Posted Date: February 16, 2009     Points: 5   

hi pankaj!

but if in client machine PDF is not support then what? it 1st ask to install acrobat reader and then read it. but i don't wish that client install acrobat reader but read file. isn't browser support it?

Author: Amit Mehra             
Posted Date: February 16, 2009     Points: 5   

You can try this code and see.



Response.ContentType = "application/pdf"

Response.AddHeader("content-disposition", "attachment; filename = yourPDF.pdf")

string filename = "c:\yourPDF.pdf";

Response.WriteFile(filename )

Please "Mark As Answer " if this post help you.

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend