【问题标题】:cfdocument inner html rendering at wrong scalecfdocument 内部 html 以错误的比例呈现
【发布时间】:2023-03-30 18:54:01
【问题描述】:

CF 版本:7,0,2,142559

<cfdocument pageheight="11" 
            pagewidth="8.5" 
            unit="in" 
            marginbottom=".7" 
            marginleft="0" 
            marginright="0" 
            margintop="1.1" 
            format="pdf" 
            pagetype="custom" 
            scale="100">

我有一个

<cfdocumentitem type="header">
  <style type="text/css" media="screen">@import "header.css";</style>
  <div class=header>
    Content
  </div>
<cfdocumentitem>

header.css 看起来像

#top {
position:absolute;
left:0in;
top:0in;
height:.458in;
width:8.5in;
background-color:#770000;
}

也有类似的页脚

然后在我的 cfdocument 标签内

<div id="content" 
     style="position:absolute; 
            left:0in; top:0in; 
            width:7in; 
            border:solid; 
            border-width:thin;">

问题是内容 div 呈现的宽度比页眉和页脚宽,看起来它超出了比例或其他原因。如果我以猜测的方式减小“内容”div的宽度并进行检查,似乎一旦我达到与页眉​​和页脚宽度匹配的宽度,它就会恢复正常比例并且不会适合我需要的宽度。我该如何解决这个问题?

烦人的是我可以将内容 div 设置为 width:6.51in;height:6.95in;它非常适合。

【问题讨论】:

    标签: coldfusion stylesheet styles cfdocument


    【解决方案1】:

    这是 CFMX 7 中的一个错误。 检查这些链接并确保更新您的服务器。

    Coldfusion MX 7 Hot Fixes
    ColdFusion MX 7 CFDocument Hotfix

    【讨论】:

    • 谢谢,让我的系统管理员检查是否已安装。
    • 根据我们的系统管理员,我们已经安装了这些更新。不过还是谢谢。
    • 您在其他版本的 CF 上试过吗? CF 运行在哪个版本的 Java 上?我相信 java 1.4 在生成 pdf 时存在问题。
    猜你喜欢
    • 1970-01-01
    • 2015-07-20
    • 2010-10-30
    • 2015-03-27
    • 2012-05-05
    • 2020-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多