سؤال

I’m having an issue with PDF output being rendered in Adobe Reader’s ‘in browser’ feature from an ASP Classic site.

I have a form with a handful of inputs that trundles off and makes a PDF report. The report renders correctly (all input values accounted for) when saved as a file, but gives a blank screen when displaying in Reader v7.0, and goes straight to a no-input-values report in v8.1.2.

Pressing ‘refresh’ in the browser from here will also display a report indicative of none of the HTML form inputs being carried forward.


  • Are there any basic mechanics of the HTML form post-back that I may have left out?

*The one thing that puzzles m*e is that un-checking the ‘Display in-browser’ option in Adobe Reader and not restarting the browser gives the correct report in both versions.

The other possible issue is something to do with the browser’s ‘Trusted sites’ policy. The domain had been added to the trusted list, and:

  • The HTML input form shows as a trusted site in the status bar
  • The in-browser PDF screen displays at ‘Unknown Zone’

To clarify:

  • If the Reader is uninstalled, the downloaded file is correct
  • If Reader is installed, and set to not display in browser, the output is correct
  • If set to display in-browser with Adobe Reader, it
    • v7.0 – Displays a blank screen. ‘Refresh’ goes to a no-input-value PDF report
    • v8.1.2 – Displays the no-input-value report
  • Un-checking the ‘Display in-browser’ option in Adobe Reader and not restarting the browser gives the correct report in both versions

There is a working old production environment, which is capable of displaying the PDF file correctly in-browser with Reader v7.0 on the same machines we’re testing with. The issue described occurs with the same code being set up in a new environment with tighter security control.

The environment also uses older technology, which won’t be upgraded. This includes:

  • The site is ASP Classic
  • The code is outputting PDF v1.3
  • Internet Explorer 6. Yes. 6.

Any ideas on why the report isn't always carrying forward the HTML input?

Any help appreciated, Thanks.

هل كانت مفيدة؟

المحلول 2

Ah, dang.

So it turns out IIS had GZIP compression enabled, and the client has an IE6-only rollout. There's much written about IE6's GZIP incompatibility, and if you're looking to conditionally allow it in IIS, there are some solutions.

The white screen is result of it being an ASP page that posts back, and changes its 'content-type' in the HTTP header (to 'application/pdf') - where IIS decides it should compress it, and fails in IE6.

Adobe Reader 8 does a 2nd request, losing the postback values.

نصائح أخرى

The ASP page that generates the PDF is not getting the values from the form. That is why it is creating a PDF form with empty values. Ensure that the HTML form directly posts to the ASP script generating the PDF. There should not be any response.transfer or response.redirect or 404 redirection that goes to the PDF-generating ASP script.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top