使用 ColdFusion cfpdfform 在新浏览器窗口中打开 PDF
我使用 ColdFusion 8 和该对象来创建 xml 文档,然后将数据写入 Intranet 上现有 PDF 文件中的字段。问题是我需要在新的浏览器窗口中打开 PDF,而不是在同一个浏览器窗口中打开,这就是现在发生的情况。
是否有任何其他信息可以与“destination=”标签一起传递以强制 PDF 表单在新的浏览器窗口中打开?
预先感谢所有回复
I'm using ColdFusion 8 to and the object to create an xml document and then write the data to fields in an existing PDF file on our intranet. The problem is that I need the PDF to open in a new browser window, not the same browser window, which is what is happening now.
Is there any additional info I can pass along with the 'destination=' tag to force the PDF form to open in a new browser window?
Thanks in advance for all replies
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将来提供代码示例将不胜感激,并且应该加快解决速度。但是,如果我正确理解您的意思,并且根据您的喜好,那么以下解决方案之一就足够了。
ColdFusion(服务器端)
如果您不将新填充的 PDF 写入磁盘:
或
如果您正在将新填充的 PDF 写入磁盘:
OR
HTML(客户端)
OR
JavaScript(客户端)
Providing code examples in the future would be greatly appreciated and should expedite resolution. However, if I am understanding you correctly, and depending on your preference, then one of the following solutions should suffice.
ColdFusion (Server-side)
If you are NOT writing the newly populated PDF to disk:
OR
If you ARE writing the newly populated PDF to disk:
OR
HTML (Client-side)
OR
JavaScript (Client-side)
我一直在寻找答案,同事引导我找到了这个简单的解决方案。这将在新的网络浏览器窗口中打开 pdf 文件。
test.pdf
index.cfm(调用页面)
showPdf.cfm
I was looking for the answer and coworker steered me towards this easy solution. This will open a pdf in a new web browser window.
<a href="showPdf.cfm?filePath=#filePath#" target="_blank">test.pdf</a>
index.cfm (calling page)
<cfheader name="Content-disposition" value="inline;filename=test.pdf">
<CFCONTENT TYPE="application/pdf" FILE="#url.filePath#" DELETEFILE="No">
showPdf.cfm