Pascal -- You might also consider using HTMLDOC. It's an old and stable system with limited capabilities, but it serves our purposes. To access it, a simple External Method which invokes it using popen2() works. (Remember to use the --quiet option to avoid zombie processes if there is an error.) On Tue, 23 Mar 2004, Pascal Francq wrote:
I think it could be helpfull for me if you could send me an example. Thanks in advance.
On Tuesday 23 March 2004 14:05, FLORAC Thierry wrote:
On Tue, 2004-03-23 at 13:44, Pascal Francq wrote:
If I use reportlab within a Python module in Zope, how should I make the interface between Zope and Python function: 1�) Creating a local file in the python function and returning a string which will be used to create a anchor tag. 2�) Something more special, like returning a canvas object which can be handle by Zope as a normal Zope object.
I use "reportlab" to generate PDF reports with Zope in two ways : 1. create a PDF file which is stored in the ZODB ; the result of the method call is then a redirection to the given file ; 2. create a PDF file "on the fly" which is not stored in the ZODB and is returned directly in the response stream.
In these two ways, the Python method generates a complete PDF document (my documents are based on BaseDocTemplate with custom Flowable subclasses) in the form of a string : this string can then be used to create a file or returned "as is" in the response.
I can send you some examples if you want.
Thierry
On Tuesday 23 March 2004 12:23, David Convent wrote:
Pascal Francq wrote:
Hi, I want to generate PDF document from within Zope. What is the easiest way to do it? I know there is a python package (reportlab) which provides functions to create PDF documents, but I am not sure it is the right solution for Zope.
as far as i know, it is the right solution
--
Prof. Pascal Francq Universit� Libre de Bruxelles CAD/CAM Department Avenue F.D. Roosevelt, 50 CP 165/14 B-1050 Brussels BELGIUM Tel. +32-2-650 47 65 Fax +32-2-650 47 24
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )