.net - iTextSharp PDF 和 Firefox 出现内容损坏错误 : does not work with Firefox 10. xx

标签 .net firefox pdf itext

我有一个已填充并展平的动态 PDF 表单。 此 PDF 可以在任何版本的 IE 上正常工作并显示。 使用 Firefox 我收到此错误:

Corrupted Content Error

The page you are trying to view cannot be shown because an error in the data transmission was detected.

The page you are trying to view cannot be shown because an error in the data transmission was detected. Please contact the website owners to inform them of this problem.

任何人都可以帮我解决为什么会出现此错误以及需要进行哪些修复才能不破坏我的功能 IE PDF 代码。

最佳答案

我也遇到了同样的问题。在 Firefox 11.0 中,我会收到“内容损坏错误”,但它会在其他浏览器中正常传送 PDF。

问题很简单,我在代码中设置了 Content-Disposition header 两次。 Firefox 显然对此很挑剔(或者最近变得如此)。一旦我摆脱了重复的 header 设置,它就工作得很好。

关于.net - iTextSharp PDF 和 Firefox 出现内容损坏错误 : does not work with Firefox 10. xx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9672715/

相关文章:

c# - 不能将 long 类型转换为 T,这里 T 是一个 Enum 的值

c# - 如何引用 System.Web.Optimization 程序集的 1.1.0.0 版本

firefox - 使用插件读取 cookie

android - 如何解决在 Android 上通过 Firefox 打开 PDF 的问题?

java - 如何使用 Java 将 pdf 文件转换为 word 文件

.net - 如何加速 .NET DataGrid 到 Excel 的导出?

javascript - .NET Jquery 500 错误

firefox - 强制 Firefox 重用现有选项卡来修改 HTML 文件

node.js - pdfmake 不包含 node.js 中的字体/文本

ubuntu - 无需从 ubuntu 进行 postscript 转换即可打印彩色激光