Welcome to Geeklog, Anonymous Friday, June 02 2023 @ 06:54 am EDT

Geeklog Forums

Iframe with PDF


Giving it a try I want to pulish a bunch of PDF files in Static page.
I found the IFRAME script on here. But the height of the iframe is so small for PDF page. How can I resize to fit the whole center page for PDF?


Text Formatted Code
<script language="JavaScript">
function iframeHeight() {
if(document.getElementById && !(document.all)) {
h = document.getElementById('iframename').contentDocument.body.scrollHeight;
document.getElementById('iframename').style.height = h;
else if(document.all) {
h = document.frames('iframename').document.body.scrollHeight;
document.all.iframename.style.height = h;
<iframe onLoad="iframeHeight();" src="cada-20041201.pdf" scrolling="no" scroll="no" id="iframename" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
Can someone help me

All times are EDT. The time is now 06:54 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content