获取损坏内容错误与iTextSharp的PDF和Firefox:不与Firefox 10.XX工作 [英] Getting Corrupted Content Error with iTextSharp PDF and Firefox: does not work with Firefox 10.xx

查看:250
本文介绍了获取损坏内容错误与iTextSharp的PDF和Firefox:不与Firefox 10.XX工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的填充和被压扁了一个动态的PDF表单。 这PDF工作,正确与IE浏览器显示出来的任何版本。 与Firefox我得到这个错误:

I have a dynamic PDF form that is populated and flattened out. This PDF works and shows up correctly with IE on any version. With Firefox I get this 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 code。

Can anyone please help me out why I am getting this error and what the fix needs to be without breaking my functional IE PDF code.

推荐答案

我有同样的问题。在Firefox 11.0,我会得到损坏的内容错误,但它会提供的PDF罚款,其他浏览器。

I had the same problem. In Firefox 11.0, I'd get "Corrupted Content Error", but it would deliver the PDF fine in other browsers.

问题只是,我已经设置了内容处置头的两次的在我的code。火狐显然是挑剔这个(或最近已变得如此)。一旦我摆脱了重复的标题设置的,它工作得很好。

The problem was simply that I had set the Content-Disposition header twice in my code. Firefox is apparently picky about this (or has recently become so). Once I got rid of the duplicate header setting, it worked fine.

这篇关于获取损坏内容错误与iTextSharp的PDF和Firefox:不与Firefox 10.XX工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆