Re: return a pdf from a python script
5 Jan
2005
5 Jan
'05
5:28 p.m.
I figured out how to return a pdf from a python script: context.REQUEST.RESPONSE.setHeader('Content-Type','application/pdf') return context['blach.pdf'] Sam
5 Jan
5 Jan
7:09 p.m.
New subject: [Zope] Re: return a pdf from a python script
Sam Boggess <sboggess@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@nuxeo.com
7761
Age (days ago)
7761
Last active (days ago)
1 comments
2 participants
participants (2)
-
Florent Guillaume -
Sam Boggess