2

我有一些按钮可以在浏览器中内联生成 PDF 文件。

这些按钮将第一次打开一个新窗口并正确生成 PDF。

但是,如果您单击任何其他按钮来生成 PDF 文件,这会重新加载第二个浏览器窗口,它在 IE 中将变为空白。但是,它可以在 Google Chrome 中使用。

这是我的两个按钮

<form target="blank" action="create_label.cfm" method="post">
<input type="hidden" value="Doe, John" name="full_name">
<input type="hidden" value="11 Test Ave" name="street_line1">
<input type="hidden" value="Testville, CA 00123" name="street_line3">
<button class="btn btn-small btn-success" type="submit">

<form target="blank" action="create_label.cfm" method="post">
<input type="hidden" value="Doe, Jane" name="full_name">
<input type="hidden" value="12 Test Ave" name="street_line1">
<input type="hidden" value="Testville, CA 00123" name="street_line3">
<button class="btn btn-small btn-success" type="submit">

如您所见,每个按钮都将地址信息发送到 create_label.cfm

第一次单击按钮时,它会打开空白窗口并以 pdf 格式加载表单数据。

如果我然后返回并再次单击任一按钮,窗口将更新然后变为空白。虽然只在 IE 中。如果我在 Chrome 中执行此操作,它实际上会使用正确的地址更新 pdf。

这是 create_label.cfm 代码

<cfdocument format="PDF" localurl="no" marginTop=".1" marginLeft=".1" marginRight=".1" marginBottom=".1" pageType="custom" pageWidth="2.625" pageHeight="2.0" overwrite="true"> 
<table width="225px" border="0" cellspacing="2" cellpadding="2"> 
<cfoutput>
<cfif isDefined('form.full_name')>
   <span style = "font-size:12px">#form.full_name#</span><br />
   </cfif>
   <cfif isDefined('form.street_line1')>
   <span style = "font-size:12px">#form.street_line1#</span><br />
   </cfif>
   <cfif isDefined('form.street_line2')>
    <span style = "font-size:12px">#form.street_line2#</span><br /> 
    </cfif>
    <cfif isDefined('form.street_line3')>
    <span style = "font-size:12px">#form.street_line3#</span><br /> 
    </cfif>
    <cfif isDefined('form.street_line4')>
    <span style = "font-size:12px">#form.street_line4#</span><br /> 
    </cfif>
    </cfoutput>
        </table>
        </cfdocument>

任何想法为什么 IE 不允许这样做?它是否在 IE 和 Adob​​e 之间缓存了一些东西?

谢谢,托尼

4

0 回答 0