[Zope] Generate PDF with Zope
Dennis Allison
allison at sumeru.stanford.EDU
Tue Mar 23 11:01:01 EST 2004
FLORAC,
ReportLab (a great product) is not thread-safe. How do you serialize use?
On Tue, 23 Mar 2004, FLORAC Thierry wrote:
> On Tue, 2004-03-23 at 13:44, Pascal Francq wrote:
>=20
> > If I use reportlab within a Python module in Zope, how should I make th=
e=20
> > interface between Zope and Python function:
> > 1=B0) Creating a local file in the python function and returning a stri=
ng which=20
> > will be used to create a anchor tag.
> > 2=B0) Something more special, like returning a canvas object which can =
be handle=20
> > by Zope as a normal Zope object.
>=20
>=20
> 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.
>=20
> 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.
>=20
> I can send you some examples if you want.
>=20
>=20
> Thierry
>=20
>=20
>=20
>=20
>=20
> > 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 easies=
t way
> > > > to do it? I know there is a python package (reportlab) which provid=
es
> > > > functions to create PDF documents, but I am not sure it is the righ=
t
> > > > solution for Zope.
> > >
> > > as far as i know, it is the right solution
>=20
More information about the Zope
mailing list