Pylons and Pisa (xhtml2pdf): blank page in IE

Posted by Utaal on Stack Overflow See other posts from Stack Overflow or by Utaal
Published on 2010-05-29T08:48:56Z Indexed on 2010/05/29 8:52 UTC
Read the original article Hit count: 219

Filed under:
|
|
|

I'm using pylons to serve a dynamically generated pdf document for reporting: my approach works in firefox & chrome (it displays the pdf inline if the plugin is available or otherwise downloads it) but IE (7 & 8) only show a blank page and doesn't prompt for download. IE correctly shows PDFs generated by other websites, though.

Don't know if it matters but the page is accessed through HTTPS.

My controller does the following:

  • renders the source page through mako
  • converts the html to pdf using pisa
  • adds these headers to the response: Content-type: application/pdf and Content-disposition: inline; filename=file.pdf

Do you have any suggestion? I seem to be stuck and cannot think of anything else to try.

© Stack Overflow or respective owner

Related posts about internet-explorer

Related posts about pdf