Click here to Skip to main content
15,885,782 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to view pdf file in jsp page and download the same pdf?
Posted
Comments
ZurdoDev 26-Dec-13 9:51am    
Where are you stuck?

1 solution

Just embed Google Doc Viewer through an iframe and specify 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! You can display not just PDF but any other file supported by the viewer like doc, xls, etc. in any browser!
 
Share this answer
 

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