views:

152

answers:

2

Our system dynamically generates a large report by converting many HTML pages into a single PDF. The resulting PDF is sent back (via the HTTP request) to the calling browser. When the report is sufficiently large (200+ pages) IE 7 intermittently chokes. The result issue is the calling PC locks up and must be rebooted. When using an alternative browser such as Mozilla Firefox (run on the same PC) executes the report, all works properly w/out any issues.

Any ideas or workarounds (other than to tell the user to use Firefox)?

+1  A: 

I beleive there are a few ways you can do this: 1) Stream the pdf binary data to the browser and change the mime type so the browser handles it as pdf, or 2) Stream the pdf bindara data to the broswer using the "attachment;file=" header which will cause the browser to give you the option of opening or saving the file.

The second option may solve your problem with the intermittent choking of the browser, although it is not as seamless as the first option and may not be the exact behaviour you want.

Jeremy
Although it doesn't 100% guarantee the lock up from stopping it does force the webbrower to make the users pick whether to open the PDF in Acrobat or w/in the browser and this does appear to make a difference.
Jason
A: 

What headers are you serving up with the PDF? IE has issues with downloadable files if the cache headers are set to no-cache, and (although) I doubt this is the issue, IE can't handle very large downloads (e.g. 2.x Gig)

scunliffe