Chris Withers wrote:
Um? What else is that method returning?
I'd suggest you call getrarTCE directly by URL, check you're setting the correct content-type and maybe set a content disposition too...
Solved. :) I create a External Method that returns the code.
I'm calling the external method using: <dtml-var "generatePDF(REQUEST.response)">
And I put the following lines at the end of the code:
fname stands for the filename
os.rename(_fname, "tces/"+_fname) file = open("tces/"+_fname).read() os.remove("tces/"+_fname) page.setHeader('content-type', 'x-application/pdf') page.setHeader('content-length', str(len(file))) page.write(file)
This was the best solution that I could thought, once reportlab didn't create PDF "on the fly", without writing in the filesystem.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce