Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 08:50 am EDT

Geeklog Forums

Iframe with PDF


Auspexian

Anonymous
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?

Tks

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;
}
}
</script>
</head>
<iframe onLoad="iframeHeight();" src="cada-20041201.pdf" scrolling="no" scroll="no" id="iframename" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
</body>
</html>
 
Can someone help me
 Quote

All times are EDT. The time is now 08:50 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