PDF embedded in fluid web page

Associate
Joined
21 Sep 2005
Posts
180
Location
Dundee
Hoping for a little help and knowledge with a PDF problem I have. I'm embedding PDF files into web pages. Accessibility issues aside, as the page the document will be sitting in is fluid, I'd like to be able to make the PDF reflect this at least up until the pont where the PDF is displaying at 100% size of its own accord.

At the moment, i'm using an embed tag, with slightly different width parameters. You can see what i mean with the images underneath, and the different width parameter used.

---------------------------------------------------
Width specified in pixels.
PHP:
echo '<embed width="530px" height="600px" src="'.$file.'"';


---------------------------------------------------
Width specified as 100%.
PHP:
echo '<embed width="100%" height="600px" src="'.$file.'"';

---------------------------------------------------

I thought that by specifying 100% width, the PDF would be displayed at 100%, if the width was available depending on users screen resolution. As you can see, the actual width of the PDF doc came out as 23%, way off from my target. I know I could hard code a width in pixels that would display the PDF at 100% width, but i'd like for this to happen dynamically within a fluid layout.

If anyone knows if this is possible and how to do it then I'd love to hear from you. I've googled away on it for quite a while with no joy. If you need more info, then just ask as I'll be checking in frequently during the day.
 
Back
Top Bottom