Forum Moderators: open

Message Too Old, No Replies

Tough one - Dynamic resizing of embedded viewer

         

dmurray14

2:02 pm on Jul 5, 2005 (gmt 0)

10+ Year Member



I have a page where I have embedded an Acrobat viewer. Many of my pages pass a file to this viewer and it loads it embedded into the page. I use this because I am able to add a navigation bar to the top of the page instead of having a straight-up PDF viewer. This makes it easy for the user to go back to the previous page or have the option of downloading the file, as well as gives information on the file. So, I have the small nav bar at a table at the top, then below that is the embedded PDF viewer. I have the width set to 100%, so it fills up the screen, but obviously you can't set height to 100%, and I have to enter a value. Is there a way to make it fill up the remainder of the screen? I would like it to stretch to fit the whole window (minus the top bar) regardless of how tall the window is.

Thanks,
Dan

BlobFisk

8:43 am on Jul 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld dmurray14!

Are you using an ActiveX to embedd the PDF? Off the top of my head I would say that you could try using JavaScript to get the available height, subtract the height of your navigation bar and resize the object then.

dmurray14

12:35 pm on Jul 6, 2005 (gmt 0)

10+ Year Member



Thanks for the welcome! I'm not doing anything too fancy, just embedding (using <embed>) a PDF file into a table below my nav bar, which is only 40px tall. I like the javascript idea, but I have no idea how I would do that. Any chance someone could give me a shove in the right direction?

Thanks,
Dan

dmurray14

12:11 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



anyone?