Click here to Skip to main content
15,886,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
I want to display PDF files in web browser. But this requires PDF reader installed on client machine. Is there any way to display PDF file in web browser without PDF reader installed on client machine and which will use its own native reader to display the contents? Is there any Control which can help me in displaying PDF file in web browser?

Kindly help.

Thanks,
Posted
Updated 18-Feb-14 17:24pm
v2

1 solution

Try Google Doc Viewer. Just embed an iframe in your page pointing to Google Doc Viewer and specifying the PDF file you want to display. This is the code you should add:

HTML
<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>


Then you just need to set up your own document file to the "url" query string param and that's it!
 
Share this answer
 
Comments
RahulMGunjal 18-Feb-14 23:15pm    
Your solution would require Active Internet connection on client machine. My system is working in intranet only where no internet connection available. Can I have any kind of control which will allow me to display PDF files in offline mode?
Marc Gabrie 19-Feb-14 15:05pm    
For offline scenarios the only thing I can think of is to convert PDF to image files using some tool from ASP.NET (look at some solutions here http://stackoverflow.com/questions/3492129/converting-pdf-file-to-images-using-c-sharp)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900