Interesting, although I'm seeing behavior that's inconsistent with the bugreport... With GZipMiddleware turned on, the pdf displays in an external viewer from both IE7 and FF2 (when I don't set the Content- Disposition); and it also displays in-browser in IE7. The only place it doesn't display is in-browser in FF2 (this is happening to everyone, not just my FF2, but I've cleared the file associations and reinstalled Acrobat Reader without any change in behavior just to be sure). Using Firebug I can see that the browser is receiving data, although it seems to be truncated near the start of the binary data in the pdf -- could be a Firebug artifact, I don't know.
-- bjorn On Jan 26, 1:51 am, Ned Batchelder <[EMAIL PROTECTED]> wrote: > We just ran into this problem also. It's reported in ticket > 6027:http://code.djangoproject.com/ticket/6027 > > GzipMiddleware and responses with files for content (rather than > strings) don't get along... > > --Ned. > > > > [EMAIL PROTECTED] wrote: > > I've been tearing my hair out for a little while trying to figure out > > why I can't display pdfs from Django in Firefox. I'm getting blank > > windows and I know it used to work ;-) > > > I'm using the code from the documentation (http:// > >www.djangoproject.com/documentation/outputting_pdf/), removing > > "attachment;" from the Content-Disposition to make the pdf display in- > > browser and not open an external viewer. > > > I've printed the response object, and everything looks ok. It works > > fine in IE7. I can view other pdf files in FF (e.g. > >http://www.merlinautomation.co.uk/automation/pub/Test%20Product%20PDF...). > > > I read in an old thread that older versions of IE could have problems > > with the pdf/gzip combination, so that gave me the idea to turn off > > GZipMiddleware... and that "fixed it". > > > I'd prefer to not turn of compression for all of my pages though, so > > two questions (1) does it seem reasonable that GZipMiddleware is the > > problem and if so (2) is there a way to turn it off on a per-view > > basis? > > > -- bjorn > > -- > Ned Batchelder,http://nedbatchelder.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

