...

View Full Version : How do I load a .pdf iinto a table cell



keithh
12-24-2007, 07:28 AM
I want to display a .pdf file in a table cell on a web page and I worked out that the following Active X statement would do it. I am told Active X is very prone to being used by miscreants to get malware spread so I would like to use Javascript instead. What is the Javascript equivalent to this please:


<object width="100%" height="550" align="middle">
<embed src="Downloads2/Drawing%20with%20WORD%20v3.pdf" width="100%" height="700" align="middle"></embed>
</object>

shyam
12-24-2007, 08:49 AM
there is no javascript equivalent (unless u want to dynamically generate the embed element in javascript). pdf is not a format that is recognized by the browser and requires the plugin from adobe to render it

another way to do the same thing is to put it an iframe

<iframe src="Downloads2/Drawing&#37;20with%20WORD%20v3.pdf" width="100%" height="700"></iframe>

keithh
12-24-2007, 02:15 PM
Shyam - thanks for that. I have never used iframes before (I am not a web developer more an enthusiastic amateur).

Is there a way of letting the user increase the display width of the iframe to the whole screen width (and I have yet to work out why my pdf display is not the width of my banner headline)

If you take a look at

http://homepages.tesco.net/keithhowell/tempweb2/index.htm

and select either tutorial or examples you will see what I mean



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum