[Zope] zserver and pdf's from buffer

Jason.Jones@awl.com Jason.Jones@awl.com
13 Apr 2001 10:34:32 -0400


Jason.Jones@awl.com wrote:
> 
> I have PDF files stored in an Interbase database that I am retrieving with gvib from an external method. The result is a buffer object that I would like to output to the browser so that the acrobat control opens to display it. All I get though is the text of the pdf stream.
> 
> I am setting the response content-type to application/pdf and I am using response.write() to stream the buffer out. Is this wrong? Do I need to create a temporary external file and send that instead?
> 
> Thanks,
> 
> Jason
> 

Why are you streaming the output instead of just pushing it out in one
shot (like with return)?

I tried pushing it out in one result first and got the same problem, I then streamed it because of a note I saw on the Adobe website that mentioned problems if the file wasn't streamed - plus I saw a webware example where they did it that way. Still, neither one seems to work for me.

Jason