18 Aug
2006
18 Aug
'06
9:31 p.m.
On Thursday 17 August 2006 10:55 am, David H wrote:
I had similar problems too. This seems to work with IE: theFile=open( self.pdfpath,'rb') result = theFile.read() .... RESPONSE.setHeader('Content-Type','application/pdf') RESPONSE.setHeader("Content-Disposition","filename=report.pdf") RESPONSE.setHeader('Content-Length',len(result)) RESPONSE.write(result)
Sending the "Content-Length" header fixed the problem. PDFs now appear inline and with their expected contents. I haven't diffed the code between 2.8 and 2.9, but I'm guessing that Zope used to send that header by default but no longer does. -- Kirk Strauser The Day Companies