whoops.....2 typos...
response.headers instead of response.header and

 response.headers['Content-Type']='application/pdf'

instead of 

 headers['Content-Type']='application/pdf'

Il giorno domenica 10 giugno 2012 02:10:54 UTC+2, Niphlod ha scritto:
>
> is "the document", i.e. this function, returning a stream of bytes 
> representing the pdf ?
> If so, you're a few steps away....
>
> Browsers get the name of the file from the Content-disposition header, e.g.
>
> Content-disposition : attachment; filename=thedocument.pdf
>
> will allow the browser to download the file.
>
> It's nice to send the content-type too
>
> Content-Type: application/pdf
>
> you can set headers in response modifying the response.header dictionary 
> before returning the stream, like
>
> headers['Content-Type']='application/pdf'
>
>
>
>

Reply via email to