Welcome to WebmasterWorld Guest from 23.20.75.214

Forum Moderators: incrediBILL

Message Too Old, No Replies

pdf's in web pages

     
7:36 pm on Aug 24, 2007 (gmt 0)

Full Member

5+ Year Member

joined:Jan 29, 2007
posts:228
votes: 0


I will be embedding a pdf document into a web page. I am creating the pdf doc on the fly and will be used as a preview for the user of the final product. Parameters are past to the server via ajax to create the pdf, then js updates the container in the html doc once the pdf file is ready.

I rarely use pdf's for web stuff so I don't have a lot of experience with them, but its just the best option for this case.

My question is, should I use an 'object/embed' tags or use an 'iframe' to display the pdf? My first guess is to use an object/embed tags so I can add a plugin path and an alternate url for no plugin.

any thoughts?

12:23 am on Aug 25, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10553
votes: 12


i am not aware of any object/embed solution for pdf's yet.
an iframe might work, but frames are frames...
12:25 am on Aug 27, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 11, 2006
posts:57
votes: 0


hmmm, yes, I am about to do a resume in pdf format and was wondering what would be the best way to display it. So far, I am just going to have a link to the pdf file. I cannot, for the life of me find it, but I recall seeing an ad for a program or site that let you embed pdf files right into your page without visitors having to click on any link or download anything.
3:20 am on Aug 28, 2007 (gmt 0)

Full Member

5+ Year Member

joined:Jan 29, 2007
posts:228
votes: 0


if your just going to display the pdf, I would suggest you convert it to an image file, such as a jpg or png file. just search for 'pdf converter' or 'PDFtoJPG' or 'PDFto PNG' or something along those lines and you'll find stuff to do it.

I will be offering this as an option for users without the pdf plugin, but for my project the pdf is the best option. I will probably be using an iframe to display the pdf doc as Firefox 1.5 had some issues with pdf's in the 'object' tag. I'm not sure what caused it, but I think it was due to my firewall not allowing the pdf plugin access to the internet and I didn't get a popup notice when the pdf was in the object tag, iframed I did.

3:28 am on Aug 28, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts:12169
votes: 55


I cannot, for the life of me find it, but I recall seeing an ad for a program or site that let you embed pdf files right into your page without visitors having to click on any link or download anything.

A framed environment will allow you to do exactly what you want to do. An <iframe> is perfect for this situation. Just set the src to the .pdf and be done with it. Those who have reader installed will see the pdf appear in the <iframe> without any interaction on their part. The src content will load as soon as the page is accessed.

You can also do some fancy schmancy stuff with CSS and open it inside a scrolling div that's hidden until activated, etc.