[Zope] Re: return a pdf from a python script
Florent Guillaume
fg at nuxeo.com
Wed Jan 5 14:09:02 EST 2005
Sam Boggess <sboggess at gmail.com> wrote:
> I figured out how to return a pdf from a python script:
>
> context.REQUEST.RESPONSE.setHeader('Content-Type','application/pdf')
> return context['blach.pdf']
The recommended way would be:
name = 'blach.pdf'
REQUEST = context.REQUEST
ob = context[name]
return ob.index_html(REQUEST, REQUEST.RESPONSE)
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope
mailing list