Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:06 pm EST
Geeklog Forums
Iframe with PDF
Auspexian
Anonymous
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
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>
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>
11
12
Quote
All times are EST. The time is now 10:06 pm.
- 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