Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to show pdf inside the aspx page?

net mvc 3. I want to display the pdf file as a part of aspx page for preview purpose.enter image description here

i don't want to use IFrame control. can we do this ?

like image 330
Red Swan Avatar asked Oct 25 '11 03:10

Red Swan


People also ask

How do I show a PDF on my website?

Generally, a hyperlink is used to link a PDF document to display in the browser. An HTML anchor link is the easiest way to display a PDF file. But if you want to display a PDF document on the web page, PDF file needs to be embedded in HTML. The HTML <embed> tag is the best option to embed PDF document on the web page.


1 Answers

I know you said no frames, but Google PDF viewer seems to be the most popular:

<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true"
  style="width:718px; height:700px;" frameborder="0"></iframe>

And you can try:

<embed src="http://yoursite.com/the.pdf" width="500" height="375">

Best Way to Embed PDF in HTML

like image 195
rick schott Avatar answered Oct 04 '22 02:10

rick schott