[Zope] Generate PDF with Zope

Pascal Francq pfrancq at ulb.ac.be
Tue Mar 23 08:32:06 EST 2004


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



More information about the Zope mailing list