我如何创建一个弹出,允许用户“打开”或保存文件时,处理coldfusion的?

当这个表单实际上不是我的,我只是在使用和预填一个已经存在的表单时,我正在试图找出如何创建它。
<cfpdfform source="82040.pdf" action="populate">
<cfpdfformparam name="cust ##" value=""> <!---Section1 Customer Number--->
</cfpdfform>我可以通过这样的操作来创建这个弹出:
<cfsetting enablecfoutputonly="true">
<cfcontent type="application/pdf">
<cfheader name="Content-Disposition" value="attachment;filename=test.pdf">
<cfdocument format="PDF" localurl="yes"
marginTop=".25" marginLeft=".25" marginRight=".25" marginBottom=".25"
pageType="custom" pageWidth="8.5" pageHeight="10.2">
<cfoutput><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PDF Export Example</title>
</head>
<body>
</body>
</html>
</cfoutput>
</cfdocument>但我不知道如何把这两者结合起来。任何帮助都是非常感谢的!
根据我的要求,我尝试过:
<cfset tempFilePath = "c:/path/to/someUniqueFileName.pdf">
<cfpdfform source="82040.pdf" action="populate" destination="#tempFilePath#">
<cfpdfformparam name="org" value="Yes"> <!---Above Section1 Original ---> <!---On--->
</cfpdfform>
<cfheader name="Content-Disposition" value="attachment;filename=Testme.pdf">
<cfcontent type="application/pdf" file="#tempFilePath#" deleteFile="false">发布于 2015-01-12 16:19:19
默认情况下,cfpdfform在浏览器ie "inline“中呈现结果。若要将其作为附件返回,请将内容保存到文件或变量中。然后使用cfheader/cfcontent将其作为附件返回。
文件:
使用“目的”属性将其保存到文件中。要避免与其他线程发生冲突,请确保使用唯一的文件名。若要在完成时自动删除临时文件,请设置deleteFile="true“
<cfset tempFilePath = "c:/path/to/someUniqueFileName.pdf">
<cfpdfform source="82040.pdf" action="populate" destination="#tempFilePath#">
...
<cfheader name="Content-Disposition" value="attachment;filename=test.pdf">
<cfcontent type="application/pdf" file="#tempFilePath#" deleteFile="false">变量:
使用"name“属性将内容保存到变量。虽然文档中没有列出"name“,但这个错误报告建议它只是文档错误。
<cfpdfform source="82040.pdf" action="populate" name="pdfContent">
... etcetera ...
<cfheader name="Content-Disposition" value="attachment;filename=test.pdf">
<cfcontent type="application/pdf" variable="#toBinary(pdfContent)#">https://stackoverflow.com/questions/27869058
复制相似问题