From gotsyk at gmail.com Mon Jun 2 16:50:36 2008 From: gotsyk at gmail.com (Gotsyk) Date: Mon, 02 Jun 2008 23:50:36 +0300 Subject: [reportlab-users] platypus/tables.py: TypeError: 'NoneType' object is unsubscriptable Message-ID: <1212439836.17848.12.camel@ubi> Hi, I am using Platypus (RL Toolkit 2.0, SVN Rev. 3046) to compose a document that has a table in it. I've got such error: File "?/GeneratePDF.py", line 133, in build_doc self.doc.build(self.story, onFirstPage=self.footer_off, onLaterPages=self.footer_on) File "/usr/lib/python2.5/site-packages/reportlab/platypus/doctemplate.py", line 911, in build BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker) File "/usr/lib/python2.5/site-packages/reportlab/platypus/doctemplate.py", line 740, in build self.handle_flowable(flowables) File "/usr/lib/python2.5/site-packages/reportlab/platypus/doctemplate.py", line 657, in handle_flowable if frame.add(S[0], self.canv, trySplit=0): File "/usr/lib/python2.5/site-packages/reportlab/platypus/frames.py", line 141, in _add w, h = flowable.wrap(aW, h) File "/usr/lib/python2.5/site-packages/reportlab/platypus/tables.py", line 978, in wrap self._calc(availWidth, availHeight) File "/usr/lib/python2.5/site-packages/reportlab/platypus/tables.py", line 523, in _calc self._calc_height(availHeight,availWidth,W=W) File "/usr/lib/python2.5/site-packages/reportlab/platypus/tables.py", line 479, in _calc_height w = max(colpositions[t[2]+1]-colpositions[t[0]],w) TypeError: 'NoneType' object is unsubscriptable I've found, that in this case, in the line w = max(colpositions[t[2]+1]-colpositions[t[0]],w) of the tables.py t which was set t = spanRanges[ji] is None. I've found simple workaround to put this line into try/except:pass and got correct pdf as result. Can you point me if I am incorrect with my data? I've found similar letter about year ago in this list but there is no result there. If that case was resolved, could you point me to it? Thank you very much. From arkadi at smartbit.be Tue Jun 3 10:24:57 2008 From: arkadi at smartbit.be (Arkadi Colson) Date: Tue, 03 Jun 2008 16:24:57 +0200 Subject: [reportlab-users] valign with large fonts Message-ID: <48455439.9070209@smartbit.be> Hi all, I'm having trouble with cells in a table where large fonts are used. The vertical alignment is set to center but the content is still at the bottom of the cell. Can I solve this without using cell heights because the content together with the fonts comes from a parsed XML file. So the font size is variable. Thanks in advance, Arkadi From robin at reportlab.com Tue Jun 3 16:45:51 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 03 Jun 2008 21:45:51 +0100 Subject: [reportlab-users] valign with large fonts In-Reply-To: <48455439.9070209@smartbit.be> References: <48455439.9070209@smartbit.be> Message-ID: <4845AD7F.9010409@jessikat.plus.net> Arkadi Colson wrote: > Hi all, > > > I'm having trouble with cells in a table where large fonts are used. The > vertical alignment is set to center but the content is still at the > bottom of the cell. Can I solve this without using cell heights because > the content together with the fonts comes from a parsed XML file. So the > font size is variable. > > > Thanks in advance, > Arkadi >nfo/reportlab-users > I have a feeling that valign should be middle, but the vertical alignment has always caused trouble so it might be busted. -- Robin Becker From arkadi at smartbit.be Wed Jun 4 05:04:36 2008 From: arkadi at smartbit.be (Arkadi Colson) Date: Wed, 04 Jun 2008 11:04:36 +0200 Subject: [reportlab-users] valign with large fonts In-Reply-To: <4845AD7F.9010409@jessikat.plus.net> References: <48455439.9070209@smartbit.be> <4845AD7F.9010409@jessikat.plus.net> Message-ID: <48465AA4.1070406@smartbit.be> So the only option will be detecting the font hight some way and using bottom padding to enlarge the cell? regards, Arkadi Robin Becker wrote: > Arkadi Colson wrote: >> Hi all, >> >> >> I'm having trouble with cells in a table where large fonts are used. >> The vertical alignment is set to center but the content is still at >> the bottom of the cell. Can I solve this without using cell heights >> because the content together with the fonts comes from a parsed XML >> file. So the font size is variable. >> >> >> Thanks in advance, >> Arkadi >> nfo/reportlab-users >> > > I have a feeling that valign should be middle, but the vertical > alignment has always caused trouble so it might be busted. From robin at reportlab.com Wed Jun 4 05:28:27 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 04 Jun 2008 10:28:27 +0100 Subject: [reportlab-users] valign with large fonts In-Reply-To: <48465AA4.1070406@smartbit.be> References: <48455439.9070209@smartbit.be> <4845AD7F.9010409@jessikat.plus.net> <48465AA4.1070406@smartbit.be> Message-ID: <4846603B.8090401@chamonix.reportlab.co.uk> Arkadi Colson wrote: > So the only option will be detecting the font hight some way and using > bottom padding to enlarge the cell? > ....... Arkadi, the code that does the alignment for simple cells looks like this just = cellstyle.alignment valign = cellstyle.valign ........ vals = string.split(str(cellval), "\n") n = len(vals) leading = cellstyle.leading fontsize = cellstyle.fontsize if valign=='BOTTOM': y = rowpos + cellstyle.bottomPadding+n*leading-fontsize elif valign=='TOP': y = rowpos + rowheight - cellstyle.topPadding - fontsize elif valign=='MIDDLE': #tim roberts pointed out missing fontsize correction 2004-10-04 y = rowpos + (cellstyle.bottomPadding + rowheight-cellstyle.topPadding+n*leading)/2.0 - fontsize else: raise...... so the valign style attribute should be doing something different. Can you send an example piece of text together with the style that's supposed to be being used eg font, font size leading etc etc. Then I'll try and have a look to see what's going on. >>> ........nt size is variable. >>> >>> >>> Thanks in advance, >>> Arkadi >>> nfo/reportlab-users >>> >> >> I have a feeling that valign should be middle, but the vertical >> alignment has always caused trouble so it might be busted. > -- Robin Becker From arkadi at smartbit.be Wed Jun 4 07:09:44 2008 From: arkadi at smartbit.be (Arkadi Colson) Date: Wed, 04 Jun 2008 13:09:44 +0200 Subject: [reportlab-users] valign with large fonts In-Reply-To: <4846603B.8090401@chamonix.reportlab.co.uk> References: <48455439.9070209@smartbit.be> <4845AD7F.9010409@jessikat.plus.net> <48465AA4.1070406@smartbit.be> <4846603B.8090401@chamonix.reportlab.co.uk> Message-ID: <484677F8.5090200@smartbit.be> Ah ok I see. I use fontsize in the Paragraph style so the "- fontsize" = "- 0". I will put the fontsize from Paragraph style to Cell style. Thanks for the info! Arkadi Robin Becker wrote: > Arkadi Colson wrote: >> So the only option will be detecting the font hight some way and >> using bottom padding to enlarge the cell? >> > ....... > > Arkadi, > the code that does the alignment for simple cells looks like this > just = cellstyle.alignment > valign = cellstyle.valign > ........ > vals = string.split(str(cellval), "\n") > n = len(vals) > leading = cellstyle.leading > fontsize = cellstyle.fontsize > if valign=='BOTTOM': > y = rowpos + cellstyle.bottomPadding+n*leading-fontsize > elif valign=='TOP': > y = rowpos + rowheight - cellstyle.topPadding - fontsize > elif valign=='MIDDLE': > #tim roberts pointed out missing fontsize correction 2004-10-04 > y = rowpos + (cellstyle.bottomPadding + > rowheight-cellstyle.topPadding+n*leading)/2.0 - fontsize > else: > raise...... > > so the valign style attribute should be doing something different. Can > you send an example piece of text together with the style that's > supposed to be being used eg font, font size leading etc etc. Then > I'll try and have a look to see what's going on. > >>>> > ........nt size is variable. >>>> >>>> >>>> Thanks in advance, >>>> Arkadi >>>> nfo/reportlab-users >>>> >>> >>> I have a feeling that valign should be middle, but the vertical >>> alignment has always caused trouble so it might be busted. >> > > From obi_radusorin at yahoo.com Wed Jun 4 08:00:22 2008 From: obi_radusorin at yahoo.com (circo radu) Date: Wed, 4 Jun 2008 05:00:22 -0700 (PDT) Subject: [reportlab-users] Fixed Height for a table Message-ID: <387362.6765.qm@web33608.mail.mud.yahoo.com>       Hy . Hope what i describe below makes sense, and u will understand my problem.    I have to generate a pdf containing a table, which will be generated dynamically. I have the table header fixed (the first 2 rows) and the last row. The rows between will be generated using some values. I dont know how many rows will I have in there.  The main fact is that i need to keep the overall Height of the table fixed ( the number of rows will not be that high so the added height value of all the rows to go beyond the tables height).   If i have only 1 or 2 rows  the table is too short. Is there a way to specify the overall height of the table? or a way to calculate the height of that last row that will fill the table bringing him to the desired height? -------------- next part -------------- An HTML attachment was scrubbed... URL: From alet at librelogiciel.com Wed Jun 4 10:13:27 2008 From: alet at librelogiciel.com (Jerome Alet) Date: Wed, 4 Jun 2008 16:13:27 +0200 Subject: [reportlab-users] [ANNOUNCE] New home and features for my PDF Punishment Generator In-Reply-To: References: <20080521083819.GA21607@mail.librelogiciel.com> <5beee6a0805260039mfc8a247t6ea6fe5e21eb747f@mail.gmail.com> <20080526074619.GA16704@mail.librelogiciel.com> Message-ID: <20080604141327.GA9630@mail.librelogiciel.com> On Mon, May 26, 2008 at 10:21:15AM +0200, Dinu Gherman wrote: > Jerome Alet: > > >I'll be glad to add more paper formats, the existing one is used > >in France, but I don't know what is used in other countries, so > >if people can give me precise dimensions, colors etc... about the > >paper format most used in your own country, please do (privately) > > when I saw your funny sample again I immediately wondered what > standard there is in France for the punch wholes in different > paper formats (if there is any at all)? > I didn't find anything specific about Franch unfortunately, believe me I searched for this, and I've not yet verified it the holes' positions match ISO 838 or 888 or not (sorry) The punishment's code was written after taking measures with a ruler on a real paper sheet. The lines format on such sheets seem to have been "invented" by http://www.cahiers-oxford.com/LaMarque.asp but nowhere was I able to find any specification. It is really the most used format in French schools, although some related formats have the lines spaced or colored differently. The other most used format in France as far as page design is concerned, is with 5mm X 5mm squares, usually with blue/violet lines in a single width, compared to the two widths / two_or_three colors used in the punishment generator. bye, and sorry for the late answer. Jerome From gherman at darwin.in-berlin.de Sat Jun 7 13:27:10 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Sat, 7 Jun 2008 19:27:10 +0200 Subject: [reportlab-users] Packaging In-Reply-To: <956003ae0805300852y51d99ab5h6de6bbb84f023268@mail.gmail.com> References: <87bq2u2f4t.fsf@enceladus.ygingras.net> <956003ae0805300852y51d99ab5h6de6bbb84f023268@mail.gmail.com> Message-ID: <40724883-A187-4451-8307-89F3A9C9994E@darwin.in-berlin.de> Andy Robinson: > We'll try to tackle this in our next release, and ensure it works > cleanly with various distutils options. > > I hoped we'd do a release in May but we have fallen behind (as Dinu > will > doubtless point out), partly as we're working on a new web site; we > did at > least go through and identifying the key changes which need > documenting. > It should hopefully come out in June/July. See also this about the importance of releases: http://www.technobabble.dk/2008/jun/07/django-importance-releases Regards, Dinu From andy at reportlab.com Sat Jun 7 16:00:03 2008 From: andy at reportlab.com (Andy Robinson) Date: Sat, 7 Jun 2008 21:00:03 +0100 Subject: [reportlab-users] Packaging In-Reply-To: <40724883-A187-4451-8307-89F3A9C9994E@darwin.in-berlin.de> References: <87bq2u2f4t.fsf@enceladus.ygingras.net> <956003ae0805300852y51d99ab5h6de6bbb84f023268@mail.gmail.com> <40724883-A187-4451-8307-89F3A9C9994E@darwin.in-berlin.de> Message-ID: <956003ae0806071300n3d807b42wff0ad99995d06a7@mail.gmail.com> 2008/6/7 Dinu Gherman : > See also this about the importance of releases: > > http://www.technobabble.dk/2008/jun/07/django-importance-releases > When I read it earlier today, I thought "Dinu will be sending it to the list..." We are working towards the release but our company has its biggest ever order book, and we tend only to find a few hours each week. Django has the same issue. - Andy From tlesher at gmail.com Tue Jun 10 14:03:40 2008 From: tlesher at gmail.com (Tim Lesher) Date: Tue, 10 Jun 2008 14:03:40 -0400 Subject: [reportlab-users] Install fails under virtualenv Message-ID: <9613db600806101103x5e3e64f9if80c0c0808e53de9@mail.gmail.com> I'm trying to install ReportLab toolkit 2.1 in a virtualenv environment (i.e., without root privileges), but installation is failing. The issue seems to be the manual path munging that the setup.py script does in package_home(). It always picks up the system-wide lib installation, rather than the local one. Is there any reason not to use distutils' package_data argument to setup() instead? Just removing "data_files=DATA_FILES.items()" and replacing it with "package_data={'reportlab': _FILES}" appears to do the right thing in my testing. Thanks. -- Tim Lesher -------------- next part -------------- An HTML attachment was scrubbed... URL: From robin at reportlab.com Tue Jun 10 17:52:09 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 10 Jun 2008 22:52:09 +0100 Subject: [reportlab-users] Install fails under virtualenv In-Reply-To: <9613db600806101103x5e3e64f9if80c0c0808e53de9@mail.gmail.com> References: <9613db600806101103x5e3e64f9if80c0c0808e53de9@mail.gmail.com> Message-ID: <484EF789.2020202@jessikat.plus.net> Tim Lesher wrote: > I'm trying to install ReportLab toolkit 2.1 in a virtualenv environment > (i.e., without root privileges), but installation is failing. > > The issue seems to be the manual path munging that the setup.py script does > in package_home(). It always picks up the system-wide lib installation, > rather than the local one. > > Is there any reason not to use distutils' package_data argument to setup() > instead? > > Just removing "data_files=DATA_FILES.items()" and replacing it with > "package_data={'reportlab': _FILES}" appears to do the right thing in my > testing. ....... unfortunately I think a lot of the setup.py code has been contributed by more than one person. I think the DATA_FILES setup is attempting to ensure that non-python code/data gets placed at the right place. It's using distutils' view of where home should be, not what distutils will really use. I suppose that code is now bad for your usage. Does anyone know the semantic difference between date_files and package_data? -- Robin Becker From tlesher at gmail.com Tue Jun 10 21:31:59 2008 From: tlesher at gmail.com (Tim Lesher) Date: Tue, 10 Jun 2008 21:31:59 -0400 Subject: [reportlab-users] Install fails under virtualenv In-Reply-To: <484EF789.2020202@jessikat.plus.net> References: <9613db600806101103x5e3e64f9if80c0c0808e53de9@mail.gmail.com> <484EF789.2020202@jessikat.plus.net> Message-ID: <9613db600806101831n5a889b0ds1ee25a7cafe84935@mail.gmail.com> On Tue, Jun 10, 2008 at 5:52 PM, Robin Becker wrote: > unfortunately I think a lot of the setup.py code has been contributed by > more than one person. I think the DATA_FILES setup is attempting to ensure > that non-python code/data gets placed at the right place. It's using > distutils' view of where home should be, not what distutils will really use. > I suppose that code is now bad for your usage. Does anyone know the semantic > difference between date_files and package_data? The short answer is "data_files has been around for a long time; package_data was added in 2.4 to address just this issue. :-)" The data_files directive takes a dict mapping destination directories (relative to sys.prefix) to lists of files to put there. ( http://docs.python.org/dist/node13.html) The package_data directive takes a dict mapping package names to lists of files to put into wherever that package is being installed (essentially doing what reportlabs' setup.py is trying to do by hand in package_home). ( http://docs.python.org/dist/node12.html) I don't know the history of the reportlabs code, but I suspect that the code in setup.py predates the existence of distutils' package_data feature. All of the files in the data_files are being, in fact, copied into the reportlabs package tree. The only refinement I can see is that for the files being copied into reportlabs/tools/xxxx, they could be added to mappings for the appropriate subpackage rather than reportlabs itself, but in reality it amounts to the same place. -- Tim Lesher -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at openindex.de Sun Jun 15 08:17:53 2008 From: andy at openindex.de (Andreas Rudolph) Date: Sun, 15 Jun 2008 14:17:53 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template Message-ID: <48550871.2040202@openindex.de> Hello all, at first I'd like to thank the developers for their great work. ReportLab looks really nice, but I'm having some problems with the provided documentation / examples. The following things I try to realize with ReportLab: - I already have an existing PDF-file, that should be used as template. - I want to open this PDF-template and write some additional content on it. - Finally the modifiied document should be saved under a new filename, or maybe send directly as HTTP-response. My questions about this: - Can this be realized with ReportLab? - If yes, can you give me a hint how to do this? I tried a bit with 'BaseDocTemplate' and 'SimpleDocTemplate', but without success so far. Thanks for your attention, greetz Andreas Rudolph -- technik at openindex.de http://www.openindex.de http://immo.openindex.de From alet at librelogiciel.com Sun Jun 15 08:32:20 2008 From: alet at librelogiciel.com (Jerome Alet) Date: Sun, 15 Jun 2008 14:32:20 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <48550871.2040202@openindex.de> References: <48550871.2040202@openindex.de> Message-ID: <20080615123220.GA9955@mail.librelogiciel.com> Hi, On Sun, Jun 15, 2008 at 02:17:53PM +0200, Andreas Rudolph wrote: > > at first I'd like to thank the developers for their great work. > ReportLab looks really nice, but I'm having some problems with the > provided documentation / examples. > > The following things I try to realize with ReportLab: > > - I already have an existing PDF-file, that should be used as template. > - I want to open this PDF-template and write some additional content on it. > - Finally the modifiied document should be saved under a new filename, > or maybe send directly as HTTP-response. > > My questions about this: > > - Can this be realized with ReportLab? > - If yes, can you give me a hint how to do this? > > I tried a bit with 'BaseDocTemplate' and 'SimpleDocTemplate', but > without success so far. Modifying an existing PDF document is not possible with ReportLab out of the box. You need their commercial offering to do this. bye Jerome Alet From andy at openindex.de Sun Jun 15 08:42:38 2008 From: andy at openindex.de (Andreas Rudolph) Date: Sun, 15 Jun 2008 14:42:38 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <20080615123220.GA9955@mail.librelogiciel.com> References: <48550871.2040202@openindex.de> <20080615123220.GA9955@mail.librelogiciel.com> Message-ID: <48550E3E.4040501@openindex.de> Hi, > Modifying an existing PDF document is not possible with ReportLab out of the box. You need their commercial offering to do this. thanks for your quick reply. So I'll need to find a better solution. You know an alternative PDF-implementation? The only Open-Source solution I know is 'iText'. This needs to be written in Java, but I don't really want to install a JVM on my customers server. greetz, Andreas Rudolph -- technik at openindex.de http://www.openindex.de http://immo.openindex.de From gherman at darwin.in-berlin.de Sun Jun 15 09:33:42 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Sun, 15 Jun 2008 15:33:42 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <48550E3E.4040501@openindex.de> References: <48550871.2040202@openindex.de> <20080615123220.GA9955@mail.librelogiciel.com> <48550E3E.4040501@openindex.de> Message-ID: <5B0EFB12-8505-485F-9343-E7F3055DF63B@darwin.in-berlin.de> Andreas Rudolph: >> Modifying an existing PDF document is not possible with ReportLab >> out of the box. You need their commercial offering to do this. > > thanks for your quick reply. So I'll need to find a better solution. > You know an alternative PDF-implementation? I'm writing something that will do what you want. You can see something quite similar posted in the following message here a while ago (in the meantime I had to replace the embedded PDF pages, because Andy didn't like them to be used for this purpose): http://two.pairlist.net/pipermail/reportlab-users/2008-May/ 006983.html You can either wait for the thing to be released and/or help its development... Regards, Dinu From andy at openindex.de Mon Jun 16 04:37:02 2008 From: andy at openindex.de (Andreas Rudolph) Date: Mon, 16 Jun 2008 10:37:02 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <5B0EFB12-8505-485F-9343-E7F3055DF63B@darwin.in-berlin.de> References: <48550871.2040202@openindex.de> <20080615123220.GA9955@mail.librelogiciel.com> <48550E3E.4040501@openindex.de> <5B0EFB12-8505-485F-9343-E7F3055DF63B@darwin.in-berlin.de> Message-ID: <4856262E.70603@openindex.de> Hi Dinu, > I'm writing something that will do what you want. You can see > something quite similar posted in the following message here > a while ago (in the meantime I had to replace the embedded > PDF pages, because Andy didn't like them to be used for this > purpose): this sounds quite interisting. > http://two.pairlist.net/pipermail/reportlab-users/2008-May/006983.html At the moment I don't see a connection between your posting and my problem. Maybe my english is just too bad. ;) > You can either wait for the thing to be released and/or help > its development... What kind of help do you need? What's the actual stage of your project? Can I take a look at the source code somewhere, maybe Sourceforge? Is the project connected to ReportLab, or something independent? greetz, Andreas Rudolph -- technik at openindex.de http://www.openindex.de http://immo.openindex.de From wthie at thiengineering.ch Mon Jun 16 04:55:52 2008 From: wthie at thiengineering.ch (Werner Thie) Date: Mon, 16 Jun 2008 10:55:52 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <48550871.2040202@openindex.de> References: <48550871.2040202@openindex.de> Message-ID: <48562A98.9090605@thiengineering.ch> Hi Andreas Having had similar requierements I went with z3c.rml, which tries to implement RML (the commercial one) with a FOSS approach and expands it even further by throwing it ZOPE templating. For examples see You can read all about ``z3c.rml`` and see many examples on how to use it, see the "RML Reference": http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/rml-reference.pdf?view=auto It does all what you asked for and probably even more. HTH, Werner Thie Andreas Rudolph wrote: > Hello all, > > at first I'd like to thank the developers for their great work. > ReportLab looks really nice, but I'm having some problems with the > provided documentation / examples. > > The following things I try to realize with ReportLab: > > - I already have an existing PDF-file, that should be used as template. > - I want to open this PDF-template and write some additional content on it. > - Finally the modifiied document should be saved under a new filename, > or maybe send directly as HTTP-response. > > My questions about this: > > - Can this be realized with ReportLab? > - If yes, can you give me a hint how to do this? > > I tried a bit with 'BaseDocTemplate' and 'SimpleDocTemplate', but > without success so far. > > > Thanks for your attention, > > > > greetz > > > > > Andreas Rudolph > > From andy at openindex.de Mon Jun 16 06:50:43 2008 From: andy at openindex.de (Andreas Rudolph) Date: Mon, 16 Jun 2008 12:50:43 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <48562A98.9090605@thiengineering.ch> References: <48550871.2040202@openindex.de> <48562A98.9090605@thiengineering.ch> Message-ID: <48564583.70401@openindex.de> Hi Werner, > You can read all about ``z3c.rml`` and see many examples on how to use > it, see the "RML Reference": > > http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/rml-reference.pdf?view=auto > > It does all what you asked for and probably even more. thanks for your advice. Do I need an installation of Zope to use this library or can it be used standalone? I never used RML, but it looks pretty nice after a first quick look. One other question in this context: Can I manipulate existing AcroForm-textfields with this library / RML? Greetz, Andreas Rudolph -- technik at openindex.de http://www.openindex.de http://immo.openindex.de From gherman at darwin.in-berlin.de Mon Jun 16 08:50:32 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Mon, 16 Jun 2008 14:50:32 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <4856262E.70603@openindex.de> References: <48550871.2040202@openindex.de> <20080615123220.GA9955@mail.librelogiciel.com> <48550E3E.4040501@openindex.de> <5B0EFB12-8505-485F-9343-E7F3055DF63B@darwin.in-berlin.de> <4856262E.70603@openindex.de> Message-ID: <0E3629F5-84B0-4FE3-89C4-1373AA8D9807@darwin.in-berlin.de> Andreas Rudolph: >> http://two.pairlist.net/pipermail/reportlab-users/2008-May/ >> 006983.html > > At the moment I don't see a connection between your posting and my > problem. Maybe my english is just too bad. ;) It rather depends on your experience with ReportLab so far. What you see in the sample is a document containing single PDF pages extracted from an external document, implemented with a PDF extraction "flowable". If you have that you can also put a "PDF template", as you call it, on a whole page as a "background". >> You can either wait for the thing to be released and/or help >> its development... > > What kind of help do you need? > What's the actual stage of your project? > Can I take a look at the source code somewhere, maybe Sourceforge? > Is the project connected to ReportLab, or something independent? It's not published yet, since it needs more testing and some finetuning, but I'm looking for opportunities to push it fur- ther. If you have any ideas for doing so feel free to email me offlist. Regards, Dinu -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Mon Jun 16 09:56:04 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 16 Jun 2008 14:56:04 +0100 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <0E3629F5-84B0-4FE3-89C4-1373AA8D9807@darwin.in-berlin.de> References: <48550871.2040202@openindex.de> <20080615123220.GA9955@mail.librelogiciel.com> <48550E3E.4040501@openindex.de> <5B0EFB12-8505-485F-9343-E7F3055DF63B@darwin.in-berlin.de> <4856262E.70603@openindex.de> <0E3629F5-84B0-4FE3-89C4-1373AA8D9807@darwin.in-berlin.de> Message-ID: <956003ae0806160656y7c20afcfsf28f65972eabf7b6@mail.gmail.com> 2008/6/16 Dinu Gherman : > It's not published yet, since it needs more testing and some > finetuning, but I'm looking for opportunities to push it fur- > ther. Hey Dinu, don't you believe in "release early, release often?" ;-) Andy From wthie at thiengineering.ch Tue Jun 17 06:06:56 2008 From: wthie at thiengineering.ch (Werner Thie) Date: Tue, 17 Jun 2008 12:06:56 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <48564583.70401@openindex.de> References: <48550871.2040202@openindex.de> <48562A98.9090605@thiengineering.ch> <48564583.70401@openindex.de> Message-ID: <48578CC0.3080506@thiengineering.ch> Hi Andreas Andreas Rudolph wrote: ...snip > thanks for your advice. Do I need an installation of Zope to use this > library or can it be used standalone? No, the z3c extensions run fine w/o a full zope. What's usually needed is the ZopeInterface package, which does a lot in helping to write cleaner code anyway. See http://www.zope.org/Products/ZopeInterface > I never used RML, but it looks pretty nice after a first quick look. > > One other question in this context: Can I manipulate existing > AcroForm-textfields with this library / RML? Never used textfields, but the whole setup is really flexible and if it's not supported out of the box, it could probably be done by yourself. If you're only interested in manipulating existing PDFs then a sneakpeek at the code in the RML package would go a long way IMHO. Regards, Werner From time_song at hotmail.com Tue Jun 17 23:23:48 2008 From: time_song at hotmail.com (=?gb2312?B?1cXApdXFwKX=?=) Date: Wed, 18 Jun 2008 03:23:48 +0000 Subject: [reportlab-users] A jerkwater bug in 'reportlab/platypus/paragraph.py' Message-ID: Hello everybody Thanks for this greateful project. Today i find a jerkwater bug in paragraph.py. Line 412-413: if type(link) is unicode: link = unicode.encode('utf8') I think it should like below, but i'm incertitude: if type(link) is str: link = link.encode('utf8') Thanks and best regards, Timesong _________________________________________________________________ ?????????????MSN????TA????? http://im.live.cn/emoticons/?ID=18 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Wed Jun 18 02:24:24 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 18 Jun 2008 07:24:24 +0100 Subject: [reportlab-users] A jerkwater bug in 'reportlab/platypus/paragraph.py' In-Reply-To: References: Message-ID: <956003ae0806172324y51da390atd611f4bacfde19e@mail.gmail.com> At this point we wanted to ensure link became a UTF8 string, so it looks correct to me. What symptoms do you get? Can you give us some failing code? - Andy On 18/06/2008, ???? wrote: > Hello everybody > > Thanks for this greateful project. Today i find a jerkwater bug in > paragraph.py. > > Line 412-413: > > if type(link) is unicode: link = unicode.encode('utf8') > > I think it should like below, but i'm incertitude: > > if type(link) is str: link = link.encode('utf8') > > Thanks and best regards, > Timesong > _________________________________________________________________ > ?????????????MSN????TA????? > http://im.live.cn/emoticons/?ID=18 -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From robin at reportlab.com Wed Jun 18 08:20:41 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 18 Jun 2008 13:20:41 +0100 Subject: [reportlab-users] A jerkwater bug in 'reportlab/platypus/paragraph.py' In-Reply-To: References: Message-ID: <4858FD99.2020402@chamonix.reportlab.co.uk> ???? wrote: > Hello everybody > > Thanks for this greateful project. Today i find a jerkwater bug in paragraph.py. > > Line 412-413: > > if type(link) is unicode: link = unicode.encode('utf8') > > I think it should like below, but i'm incertitude: > > if type(link) is str: link = link.encode('utf8') > > Thanks and best regards, > Timesong I think this is a bug and it probably should read if isinstance(link,unicode): link = link.encode('utf8') later on(in more uncodely friendly times) it might get turned around and then be if isinstance(link,str): link = link.decode('utf8') -- Robin Becker From andy at reportlab.com Wed Jun 18 09:53:04 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 18 Jun 2008 14:53:04 +0100 Subject: [reportlab-users] A jerkwater bug in 'reportlab/platypus/paragraph.py' In-Reply-To: <4858FD99.2020402@chamonix.reportlab.co.uk> References: <4858FD99.2020402@chamonix.reportlab.co.uk> Message-ID: <956003ae0806180653l45306dadk16f4f346c4c3f77@mail.gmail.com> 2008/6/18 Robin Becker : > if isinstance(link,unicode): link = link.encode('utf8') You're right of course, I was asleep and read it incorrectly this morning. We want to make sure link becomes a utf8 string. - Andy From gherman at darwin.in-berlin.de Wed Jun 18 10:33:39 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Wed, 18 Jun 2008 16:33:39 +0200 Subject: [reportlab-users] newbie question about PDF-generation from template In-Reply-To: <956003ae0806160656y7c20afcfsf28f65972eabf7b6@mail.gmail.com> References: <48550871.2040202@openindex.de> <20080615123220.GA9955@mail.librelogiciel.com> <48550E3E.4040501@openindex.de> <5B0EFB12-8505-485F-9343-E7F3055DF63B@darwin.in-berlin.de> <4856262E.70603@openindex.de> <0E3629F5-84B0-4FE3-89C4-1373AA8D9807@darwin.in-berlin.de> <956003ae0806160656y7c20afcfsf28f65972eabf7b6@mail.gmail.com> Message-ID: <4D426DFB-6E2F-4E40-A023-6883D5C7013E@darwin.in-berlin.de> Andy Robinson: > Hey Dinu, don't you believe in "release early, release often?" ;-) LOFL... that's so Monty! :-) The short answer is: yes, after the *first* release! The long answer is: You're mixing different aspects of what it means to "release" something. The first is to bring something into existance, while the second is to update something already existing. But I'm sure, YMWV. Well ok, I'll stop nagging and leave it to others to tell you about getting errors with specific TrueType fonts at ISPs, who don't like installing SVN-snapshots for security reasons, while the latest Debian package of RL is one year old, etc. etc. And BTW, Django is no longer an idol to follow, since they are now committed to 1.0 for september this year! ;-) Best wishes, Dinu From stephen at lisclare.com Fri Jun 20 14:36:31 2008 From: stephen at lisclare.com (Stephen Hall) Date: Fri, 20 Jun 2008 19:36:31 +0100 Subject: [reportlab-users] tags within TinyErp Message-ID: <7A631DBFC07DCD4FAB3E530E06DC5B4E2C696B@DC1.lisclare.local> Hi, Does anyone know if tags should work within TinyErp reports? I am getting blank output for anything contained within them. Regards, Stephen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robin at reportlab.com Sat Jun 21 05:12:13 2008 From: robin at reportlab.com (Robin Becker) Date: Sat, 21 Jun 2008 10:12:13 +0100 Subject: [reportlab-users] tags within TinyErp In-Reply-To: <7A631DBFC07DCD4FAB3E530E06DC5B4E2C696B@DC1.lisclare.local> References: <7A631DBFC07DCD4FAB3E530E06DC5B4E2C696B@DC1.lisclare.local> Message-ID: <485CC5ED.7020908@jessikat.plus.net> Stephen Hall wrote: > Hi, > > > > Does anyone know if tags should work within TinyErp reports? I am > getting blank output for anything contained within them. > > > > Regards, > > Stephen. Unfortunately I have no idea what TinyErp is except that there's a website which directs you to openerp where large amounts of links and stuff awaits. How does it relate to reportlab? -- Robin Becker From andy at reportlab.com Sat Jun 21 09:08:42 2008 From: andy at reportlab.com (Andy Robinson) Date: Sat, 21 Jun 2008 14:08:42 +0100 Subject: [reportlab-users] tags within TinyErp In-Reply-To: <485CC5ED.7020908@jessikat.plus.net> References: <7A631DBFC07DCD4FAB3E530E06DC5B4E2C696B@DC1.lisclare.local> <485CC5ED.7020908@jessikat.plus.net> Message-ID: <956003ae0806210608h4c43df12p7f632a6904fd85e6@mail.gmail.com> 2008/6/21 Robin Becker : > Stephen Hall wrote: >> Does anyone know if tags should work within TinyErp reports? I am >> getting blank output for anything contained within them. > Unfortunately I have no idea what TinyErp is except that there's a website > which directs you to openerp where large amounts of links and stuff awaits. > How does it relate to reportlab? It uses TinyRML, which was an RML clone written by Fabian PInckaers several years ago. It uses our engine but not our parser, and since PTO was implemented years later by ourselves, I am pretty sure it does not support this tag. RML is trademarked by ReportLab and the only implementation we can support properly is our own (commercial) one. Best Regards, Andy Robinson ReportLab From stephen at lisclare.com Sun Jun 22 08:04:00 2008 From: stephen at lisclare.com (Stephen Hall) Date: Sun, 22 Jun 2008 13:04:00 +0100 Subject: [reportlab-users] tags within TinyErp In-Reply-To: References: Message-ID: <7A631DBFC07DCD4FAB3E530E06DC5B4E2C696D@DC1.lisclare.local> Hi Andy, Many thanks for clearing up that confusion on my part. ReportLab appears to be a very sophisticated and well supported product. I am most disappointed it is not fully supported within OpenErp. Kind regards, Stephen. -----Original Message----- From: reportlab-users-bounces at reportlab.com [mailto:reportlab-users-bounces at reportlab.com] On Behalf Of reportlab-users-request at reportlab.com Sent: 21 June 2008 17:01 To: reportlab-users at reportlab.com Subject: reportlab-users Digest, Vol 48, Issue 9 Send reportlab-users mailing list submissions to reportlab-users at reportlab.com To subscribe or unsubscribe via the World Wide Web, visit http://two.pairlist.net/mailman/listinfo/reportlab-users or, via email, send a message with subject or body 'help' to reportlab-users-request at reportlab.com You can reach the person managing the list at reportlab-users-owner at reportlab.com When replying, please edit your Subject line so it is more specific than "Re: Contents of reportlab-users digest..." Today's Topics: 1. tags within TinyErp (Stephen Hall) 2. Re: tags within TinyErp (Robin Becker) 3. Re: tags within TinyErp (Andy Robinson) ---------------------------------------------------------------------- Message: 1 Date: Fri, 20 Jun 2008 19:36:31 +0100 From: "Stephen Hall" Subject: [reportlab-users] tags within TinyErp To: Message-ID: <7A631DBFC07DCD4FAB3E530E06DC5B4E2C696B at DC1.lisclare.local> Content-Type: text/plain; charset="us-ascii" Hi, Does anyone know if tags should work within TinyErp reports? I am getting blank output for anything contained within them. Regards, Stephen. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Sat, 21 Jun 2008 10:12:13 +0100 From: Robin Becker Subject: Re: [reportlab-users] tags within TinyErp To: Support list for users of Reportlab software Message-ID: <485CC5ED.7020908 at jessikat.plus.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Stephen Hall wrote: > Hi, > > > > Does anyone know if tags should work within TinyErp reports? I am > getting blank output for anything contained within them. > > > > Regards, > > Stephen. Unfortunately I have no idea what TinyErp is except that there's a website which directs you to openerp where large amounts of links and stuff awaits. How does it relate to reportlab? -- Robin Becker ------------------------------ Message: 3 Date: Sat, 21 Jun 2008 14:08:42 +0100 From: "Andy Robinson" Subject: Re: [reportlab-users] tags within TinyErp To: "Support list for users of Reportlab software" Message-ID: <956003ae0806210608h4c43df12p7f632a6904fd85e6 at mail.gmail.com> Content-Type: text/plain; charset=UTF-8 2008/6/21 Robin Becker : > Stephen Hall wrote: >> Does anyone know if tags should work within TinyErp reports? I am >> getting blank output for anything contained within them. > Unfortunately I have no idea what TinyErp is except that there's a website > which directs you to openerp where large amounts of links and stuff awaits. > How does it relate to reportlab? It uses TinyRML, which was an RML clone written by Fabian PInckaers several years ago. It uses our engine but not our parser, and since PTO was implemented years later by ourselves, I am pretty sure it does not support this tag. RML is trademarked by ReportLab and the only implementation we can support properly is our own (commercial) one. Best Regards, Andy Robinson ReportLab ------------------------------ _______________________________________________ reportlab-users mailing list reportlab-users at reportlab.com http://two.pairlist.net/mailman/listinfo/reportlab-users End of reportlab-users Digest, Vol 48, Issue 9 ********************************************** From bfreeman at appropriatesolutions.com Mon Jun 23 14:45:10 2008 From: bfreeman at appropriatesolutions.com (Bill Freeman) Date: Mon, 23 Jun 2008 14:45:10 -0400 Subject: [reportlab-users] Where's rl_check.py, really? Message-ID: <485FEF36.6050309@appropriatesolutions.com> rl_check.py appears to be missing from the location specified in the user's guide (http://www.reportlab.org/ftp/). Is there someone I should tell? Bill From robin at reportlab.com Tue Jun 24 04:58:44 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 24 Jun 2008 09:58:44 +0100 Subject: [reportlab-users] Where's rl_check.py, really? In-Reply-To: <485FEF36.6050309@appropriatesolutions.com> References: <485FEF36.6050309@appropriatesolutions.com> Message-ID: <4860B744.6010100@chamonix.reportlab.co.uk> Bill Freeman wrote: > rl_check.py appears to be missing from the location specified in the > user's guide (http://www.reportlab.org/ftp/). > > Is there someone I should tell? > > Bill ....... That's here thanks; we aren't running ftp on our server right now so perhaps the link is broken. I'll investigate. -- Robin Becker