打开 pdf 时调整 iframe 大小

发布于 2024-08-03 14:47:32 字数 3249 浏览 1 评论 0原文

我有一个 iframe,我想从侧栏上的列表中打开 pdf 文件。

我一切正常,但 pdf 显示在 500 x 200 的小框中,并且不会“调整大小”,以便用户可以阅读整个页面。

实时网站位于此处 http://www.markonsolutions.com/opportunities.php

其背后的代码是

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MARKON, Inc. - Professional Services, Personal Solutions</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="careers.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8011431-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<div id="header"></div>
<div id="menu">
<ul>
<li><a href="index.html" accesskey="1">Home</a></li>
<li><a href="aboutus.html" accesskey="2">About Us</a></li>
<li><a href="capabilities.html" accesskey="3">Capabilities</a></li>
<li><a href="contracts.html" accesskey="4">Contracts</a></li>
<li><a href="careers.html" accesskey="5">Careers</a></li>
<li><a href="contactus.html" accesskey="6">Contact Us</a></li>
</ul>
</div>
<div id="content">
<div id="colOne">
<h2>Opportunities</h2>

<IFRAME SRC="newpage.html" width="100%" height="100%" id="iframe1" marginheight="0" frameborder="0" "></iframe>


</div>
<div id="colTwo">
<h2>Careers</h2>
<ul>
<li><a href="opportunities.html">Opportunities</a></li>
<li><a href="benefits.html">Benefits</a></li>
</ul>
<h2>Open Positions</h2>
<?php
$files = glob("./jobops/*.pdf");

sort($files);

//print("<br>"+count($files)+"<br>");

print("<ul>");
foreach ($files as &$file)
{
    $Jobname =substr($file,0,strlen($file)-4);
    $Jobname = str_replace("./jobops/","",$Jobname);
    print("<li><a href=\"$file\" target=\"iframe1\">$Jobname</a></li>");
}
print("</ul>");
?>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<div id="footer">
<p>Copyright &copy; 2009 <a href="http://www.markonsolutions.com"><strong>MARKON, Inc.</strong></a></p>
</div>
</body>
</html>

I have a iframe that i want to open pdf's into from a list on the side bar.

I have everything working but the pdf shows up in a little 500 by 200 box on the and wont "resize" to so the user can read the entire page.

the live site is located here
http://www.markonsolutions.com/opportunities.php

and the code behind it is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MARKON, Inc. - Professional Services, Personal Solutions</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="careers.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8011431-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<div id="header"></div>
<div id="menu">
<ul>
<li><a href="index.html" accesskey="1">Home</a></li>
<li><a href="aboutus.html" accesskey="2">About Us</a></li>
<li><a href="capabilities.html" accesskey="3">Capabilities</a></li>
<li><a href="contracts.html" accesskey="4">Contracts</a></li>
<li><a href="careers.html" accesskey="5">Careers</a></li>
<li><a href="contactus.html" accesskey="6">Contact Us</a></li>
</ul>
</div>
<div id="content">
<div id="colOne">
<h2>Opportunities</h2>

<IFRAME SRC="newpage.html" width="100%" height="100%" id="iframe1" marginheight="0" frameborder="0" "></iframe>


</div>
<div id="colTwo">
<h2>Careers</h2>
<ul>
<li><a href="opportunities.html">Opportunities</a></li>
<li><a href="benefits.html">Benefits</a></li>
</ul>
<h2>Open Positions</h2>
<?php
$files = glob("./jobops/*.pdf");

sort($files);

//print("<br>"+count($files)+"<br>");

print("<ul>");
foreach ($files as &$file)
{
    $Jobname =substr($file,0,strlen($file)-4);
    $Jobname = str_replace("./jobops/","",$Jobname);
    print("<li><a href=\"$file\" target=\"iframe1\">$Jobname</a></li>");
}
print("</ul>");
?>
</div>
<div style="clear: both;"> </div>
</div>
<div id="footer">
<p>Copyright © 2009 <a href="http://www.markonsolutions.com"><strong>MARKON, Inc.</strong></a></p>
</div>
</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拧巴小姐 2024-08-10 14:47:32

显示在渲染页面中的代码将高度设置为 200px...

<IFRAME SRC="newpage.html" width="100%" height="200px"...

并且 newpage.html 的渲染代码包含一个关闭 div 标签,但不包含该 div 的开放标签。

你用什么来将 pdf 中的文本填充到 newpage 中?

the code that shows up in the rendered page is setting the height at 200px...

<IFRAME SRC="newpage.html" width="100%" height="200px"...

and the rendered code for newpage.html includes a close div tag but not an open tag for the div.

What are you using to populate the text from the pdf to newpage?

素年丶 2024-08-10 14:47:32

我上传了错误的版本!

I was uploading the wrong version!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文