This is from one of my controllers:

            pdf_key = args[0]
            server = xmlrpclib.ServerProxy(turbogears.config.get('xmlrpc.uri'))
            pdf = server.get_pdf(pdf_key)
            cherrypy.response.headerMap ["content-type"] = "application/pdf"
            return pdf.data

server.get_pdf() returns binary pdf data from an Oracle blob column.

On 7/17/06, Silas Snider <[EMAIL PROTECTED]> wrote:

I need to write an application that, among other things, generates .pdf
files that are than served up to the user. Unfotunately, I can't figure
out how to serve up binary content rather than html content from within
turbogears (in the expose() decorator). I am using reportlab to
generate the pdfs, but how do I spit them out at the client?


Sincerely,
Silas Snider



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to