Re: [Zope] Generating and Downloading PDF[Solved]

2005-05-13 Thread Andreas Jung
--On Freitag, 13. Mai 2005 13:43 Uhr -0300 Fernando Lujan <[EMAIL PROTECTED]> wrote: This was the best solution that I could thought, once reportlab didn't create PDF "on the fly", without writing in the filesystem. You could use cStringIO for writing the file in memory but in reality it really

Re: [Zope] Generating and Downloading PDF[Solved]

2005-05-13 Thread Fernando Lujan
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:

Re: [Zope] Generating and Downloading PDF.

2005-05-12 Thread Chris Withers
Fernando Lujan wrote: I'm calling this external method through a tag, inside a DTML DOCUMENT. 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... cheers, Chris -- Simplis

Re: [Zope] Generating and Downloading PDF.

2005-04-28 Thread Fernando Lujan
J Cameron Cooper wrote: > It's easier to guess when you say what the problem is. I do see some funny indentation down at the bottom. OK, it's happen because I paste the code inside a html message, than it's happen. The following code is working. But I still have a problem. The browser ( firefox

Re: [Zope] Generating and Downloading PDF.

2005-04-27 Thread J Cameron Cooper
Fernando Lujan wrote: J Cameron Cooper wrote: Fernando Lujan wrote: J Cameron Cooper wrote: The method that contains your code must have at least the first parameter 'self':: def pdfwrite(self): R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('co

Re: [Zope] Generating and Downloading PDF.

2005-04-27 Thread Fernando Lujan
J Cameron Cooper wrote: Fernando Lujan wrote: J Cameron Cooper wrote: The method that contains your code must have at least the first parameter 'self':: def pdfwrite(self): R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len

Re: [Zope] Generating and Downloading PDF.

2005-04-27 Thread J Cameron Cooper
Fernando Lujan wrote: J Cameron Cooper wrote: The method that contains your code must have at least the first parameter 'self':: def pdfwrite(self): R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(dat

Re: [Zope] Generating and Downloading PDF.

2005-04-27 Thread Fernando Lujan
J Cameron Cooper wrote: The method that contains your code must have at least the first parameter 'self':: def pdfwrite(self): R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(data) It's a way of getti

Re: [Zope] Generating and Downloading PDF.

2005-04-27 Thread Andreas Jung
--On Mittwoch, 27. April 2005 15:56 Uhr -0300 Fernando Lujan <[EMAIL PROTECTED]> wrote: Is there some import wich I have been missing? At least we are missing the *complete* definition of the method. Your code fragment is insufficient. -aj pgpURp1R95QIW.pgp Description: PGP signature _

Re: [Zope] Generating and Downloading PDF.

2005-04-27 Thread J Cameron Cooper
Fernando Lujan wrote: Hi guys, I'm creating a pdf using reportlab, after the canvas.close() I put the following code inside a External Method: R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(data) But I receive the follo

[Zope] Generating and Downloading PDF.

2005-04-27 Thread Fernando Lujan
Hi guys, I'm creating a pdf using reportlab, after the canvas.close() I put the following code inside a External Method: R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(data) But I receive the following error: *Error Typ