I used <object> tag, <img> tag....even 'background-image:' but in all cases wenever the page consisting pdf file opens up in browser... it prompts the open/save dialog box.
i want it to open automatically in the web page.....
yeah...those activex object and browser capability teweaking....will fix it but i want a method to embed the pdf page
currently adobe reader is not an embedable object, its a document viewer. this means when the browser loads a pdf, it load a pdf viewer instead of a html viewer into the frame/iframe. as said above you need to use an iframe.
<iframe src="mypdf.aspx" ></iframe>
note: if you get save as dialog, this means either there is no pdf viewer installed, or you are specifying the download as an attachment
manishmishra...
Member
122 Points
35 Posts
How To Embed a pdf file in asp.net page
Mar 16, 2010 03:21 PM|LINK
I used <object> tag, <img> tag....even 'background-image:' but in all cases wenever the page consisting pdf file opens up in browser... it prompts the open/save dialog box.
i want it to open automatically in the web page.....
yeah...those activex object and browser capability teweaking....will fix it but i want a method to embed the pdf page
any simple method........?help me out
RichardY
Star
8376 Points
1573 Posts
Re: How To Embed a pdf file in asp.net page
Mar 16, 2010 06:38 PM|LINK
Use an <iframe> tag like this:
<iframe src="somefile.PDF" width="810px" height="500px" scrolling="no" frameborder="0">
</iframe>
Hope this helps.
KumarHarsh
All-Star
15133 Points
3647 Posts
Re: How To Embed a pdf file in asp.net page
Mar 17, 2010 06:53 AM|LINK
try any one,
<div style="vertical-align:top" align="center">
<object type="application/pdf" data="<%=Request.QueryString("file") %>" width="500" height="650" ></object>
or
<embed src="<%=Request.QueryString("file") %>#toolbar=0&navpanes=0&statusbar=0" width="850" height="625"></embed>
or
<iframe src="<%=Request.QueryString("file") %>#toolbar=0&navpanes=0&statusbar=0" width="900" height="625" ></iframe>
</div>
But iframe work in all browser.
Kumar Harsh
manishmishra...
Member
122 Points
35 Posts
Re: How To Embed a pdf file in asp.net page
Mar 17, 2010 03:39 PM|LINK
no, i have tried this one like i said.....it's simply initiating my download accelerator to download the pdf file..
the method am talking of shud b similar to this one
http://www.beansoftware.com/ASP.NET-Tutorials/PDF-View-Custom-Control.aspx
but it's too complex.....anything similar but easy to understand and implement?
bruce (sqlwo...
All-Star
36822 Points
5441 Posts
Re: How To Embed a pdf file in asp.net page
Mar 17, 2010 03:58 PM|LINK
currently adobe reader is not an embedable object, its a document viewer. this means when the browser loads a pdf, it load a pdf viewer instead of a html viewer into the frame/iframe. as said above you need to use an iframe.
<iframe src="mypdf.aspx" ></iframe>
note: if you get save as dialog, this means either there is no pdf viewer installed, or you are specifying the download as an attachment
manishmishra...
Member
122 Points
35 Posts
Re: How To Embed a pdf file in asp.net page
Mar 18, 2010 01:36 AM|LINK
i've pdf viewer on my system, possibly the later one is the rzn....but that's the whole point...i don't want to rely on this fact
'users shud have pdf viewer installed'....
am designing this page for a lame user, who is expected to have minimal S/Ws in his/her system . so any way i cn show them
[df embedded in the webpage, without any prerequist(or say minimal prerequist).........plz help me out.........
hans_v
All-Star
35986 Points
6550 Posts
Re: How To Embed a pdf file in asp.net page
Mar 18, 2010 01:50 AM|LINK
Use Google Document Viewer
https://docs.google.com/viewer
Something like:
<iframe src="http://docs.google.com/viewer?url=http://www.yourdomain.com/filename.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
manishmishra...
Member
122 Points
35 Posts
Re: How To Embed a pdf file in asp.net page
Mar 18, 2010 03:41 AM|LINK
yeah, this is the solution to the question, 'How to embed pdf file inside the browser'.....and that's
pretty simple and wud b avialable to all.
am jst wondering though, tht in wat case we have to go thru the method described in the link below then?
........................................
http://www.beansoftware.com/ASP.NET-Tutorials/PDF-View-Custom-Control.aspx
...........................................
wat's d difference between in the end result of 'hans v' super simple method and this one...........?
hans_v
All-Star
35986 Points
6550 Posts
Re: How To Embed a pdf file in asp.net page
Mar 18, 2010 03:53 AM|LINK
That control isn't really a control, it just renders the iframe solution as described in other answers, requiring a pdf viewer on the client!