Welcome to WebmasterWorld Guest from 54.163.84.199

Forum Moderators: incrediBILL

pdf's in web pages

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

5+ Year Member



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)

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



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)

5+ Year Member



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)

5+ Year Member



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)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month