From reportlab-users@reportlab.com Mon Dec 2 14:25:13 2002 From: reportlab-users@reportlab.com (Ingo Graser) Date: Mon, 2 Dec 2002 15:25:13 +0100 (CET) Subject: [reportlab-users] add labels to axes Message-ID: <2220.28.1.42.67.1038839113.squirrel@web03.rasselstein-hoesch.de> Hi! I need 2 more labels for showing Dimension and Description to be attached to each axis. What do I have to to do ? Greetings, Ingo :) ------------------------------------- Der Inhalt dieser e-Mail ist ausschlieŒlich fr den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser e-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Ver”ffentlichung, Vervielf„ltigung oder Weitergabe des Inhalts dieser e-Mail unzul„ssig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der e-Mail in Verbindung zu setzen. The information contained in this e-mail ist intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, any from of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. Unsere e-mail Adresse hat sich ge"ndert. Wir sind aber auch weiterhin unter der alten Adresse @rasselstein-hoesch.de zu erreichen. Please note that our e-mail address has changed. Nevertheless you still can reach us by our old address @rasselstein-hoesch.de . From reportlab-users@reportlab.com Mon Dec 2 17:02:29 2002 From: reportlab-users@reportlab.com (Eric van Riet Paap) Date: Mon, 2 Dec 2002 18:02:29 +0100 Subject: [reportlab-users] pyRXP -> XML Message-ID: <003a01c29a24$9cada100$9700000a@ericowxkwws9hl> This is a multi-part message in MIME format. ------=_NextPart_000_0037_01C29A2C.FAC331D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm working on some small additions to your pyRXP package. So far I only = have one useful function. Perhaps you can put in the next version of = pyRXP if you find is worthwhile! The one function I have currently = convert a pyRXP tuple back to XML (for saving xml), this is very handy = when you modify the tuple after parsing it with pyRXP) . The source it = very small, the zip file somewhat large (for what it does) because some = large xml files are embedded for unittesting. Another thing I plan add = is a convertor for pyRXP tuples to an object-tree where the goal is to = accessing the data is as straigtforward as possible. pyRXP tuples are = very clean,small,etc. but accessing them is not really clean looking. All comments are welcome! kind regards, Eric van Riet paap Utrecht, The Netherlands ------=_NextPart_000_0037_01C29A2C.FAC331D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I'm working on some small additions to = your pyRXP=20 package. So far I only have one useful function. Perhaps you can put in = the next=20 version of pyRXP if you find is worthwhile! The one function I have = currently=20 convert a pyRXP tuple back to XML (for saving xml), this is very handy = when you=20 modify the tuple after parsing it with pyRXP) . The source it very = small, the=20 zip file somewhat large (for what it does) because some large xml files = are=20 embedded for unittesting. Another thing I plan add is a convertor for = pyRXP=20 tuples to an object-tree where the goal is to accessing the data is as=20 straigtforward as possible. pyRXP tuples are very clean,small,etc. but = accessing=20 them is not really clean looking.
 
All comments are welcome!
 
kind regards,
Eric van Riet paap
Utrecht, The Netherlands
 
------=_NextPart_000_0037_01C29A2C.FAC331D0-- From reportlab-users@reportlab.com Mon Dec 2 17:14:24 2002 From: reportlab-users@reportlab.com (Aaron Watters) Date: Mon, 02 Dec 2002 12:14:24 -0500 Subject: [reportlab-users] pyRXP -> XML References: <003a01c29a24$9cada100$9700000a@ericowxkwws9hl> Message-ID: <3DEB94F0.3080900@reportlab.com> --------------000500050704040105030405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Great! The object tree idea is nice. The reason we didn't do it that way is because it potentially adds a great deal of overhead. Also Andy, Robin and I didn't think (name, attributes, content, extra) = parse goobervalue = attributes["goober"] for c in content: doSomethingWith(c) was really that unpleasant to work with. However it might be nice to do something cleaner like goobervalue = parse.goober for c in parse: doSomethingWith(c) But if implemented in python I suspect you'd see a noticable performance hit. Good luck! -- Aaron Watters Eric van Riet Paap wrote: > Hi, > > > > I'm working on some small additions to your pyRXP package. So far I > only have one useful function. Perhaps you can put in the next version > of pyRXP if you find is worthwhile! The one function I have currently > convert a pyRXP tuple back to XML (for saving xml), this is very handy > when you modify the tuple after parsing it with pyRXP) . The source it > very small, the zip file somewhat large (for what it does) because > some large xml files are embedded for unittesting. Another thing I > plan add is a convertor for pyRXP tuples to an object-tree where the > goal is to accessing the data is as straigtforward as possible. pyRXP > tuples are very clean,small,etc. but accessing them is not really > clean looking. > > > > All comments are welcome! > > > > kind regards, > > Eric van Riet paap > > Utrecht, The Netherlands > > > --------------000500050704040105030405 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Great!

The object tree idea is nice.  The reason we didn't do it that way
is because it potentially adds a great deal of overhead.
Also Andy, Robin and I didn't think

(name, attributes, content, extra) = parse
goobervalue = attributes["goober"]
for c in content:
    doSomethingWith(c)

was really that unpleasant to work with.   However it might be
nice to do something cleaner like

goobervalue = parse.goober
for c in parse:
    doSomethingWith(c)

But if implemented in python I suspect you'd see
a noticable performance hit.

Good luck!

   -- Aaron Watters

Eric van Riet Paap wrote:
Hi,
 
I'm working on some small additions to your pyRXP package. So far I only have one useful function. Perhaps you can put in the next version of pyRXP if you find is worthwhile! The one function I have currently convert a pyRXP tuple back to XML (for saving xml), this is very handy when you modify the tuple after parsing it with pyRXP) . The source it very small, the zip file somewhat large (for what it does) because some large xml files are embedded for unittesting. Another thing I plan add is a convertor for pyRXP tuples to an object-tree where the goal is to accessing the data is as straigtforward as possible. pyRXP tuples are very clean,small,etc. but accessing them is not really clean looking.
 
All comments are welcome!
 
kind regards,
Eric van Riet paap
Utrecht, The Netherlands
 

--------------000500050704040105030405-- From reportlab-users@reportlab.com Mon Dec 2 18:48:27 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Mon, 2 Dec 2002 18:48:27 -0000 Subject: [reportlab-users] pyRXP -> XML In-Reply-To: <3DEB94F0.3080900@reportlab.com> Message-ID: This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C29A33.66989340 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Alex Martelli also made very nice suggestions about using generators and iterators to make iteration nice. We'll try to work this in during the week. - Andy -----Original Message----- From: reportlab-users-admin@reportlab.com [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Aaron Watters Sent: 02 December 2002 17:14 To: reportlab-users@reportlab.com Subject: Re: [reportlab-users] pyRXP -> XML Great! The object tree idea is nice. The reason we didn't do it that way is because it potentially adds a great deal of overhead. Also Andy, Robin and I didn't think (name, attributes, content, extra) = parse goobervalue = attributes["goober"] for c in content: doSomethingWith(c) was really that unpleasant to work with. However it might be nice to do something cleaner like goobervalue = parse.goober for c in parse: doSomethingWith(c) But if implemented in python I suspect you'd see a noticable performance hit. Good luck! -- Aaron Watters Eric van Riet Paap wrote: Hi, I'm working on some small additions to your pyRXP package. So far I only have one useful function. Perhaps you can put in the next version of pyRXP if you find is worthwhile! The one function I have currently convert a pyRXP tuple back to XML (for saving xml), this is very handy when you modify the tuple after parsing it with pyRXP) . The source it very small, the zip file somewhat large (for what it does) because some large xml files are embedded for unittesting. Another thing I plan add is a convertor for pyRXP tuples to an object-tree where the goal is to accessing the data is as straigtforward as possible. pyRXP tuples are very clean,small,etc. but accessing them is not really clean looking. All comments are welcome! kind regards, Eric van Riet paap Utrecht, The Netherlands ------=_NextPart_000_000B_01C29A33.66989340 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
Alex=20 Martelli also made very nice suggestions about
using=20 generators and iterators to make iteration nice.
 
We'll=20 try to work this in during the week.
 
-=20 Andy
-----Original Message-----
From:=20 reportlab-users-admin@reportlab.com=20 [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Aaron=20 Watters
Sent: 02 December 2002 17:14
To:=20 reportlab-users@reportlab.com
Subject: Re: [reportlab-users] = pyRXP=20 -> XML

Great!

The object tree idea is = nice.=20  The reason we didn't do it that way
is because it potentially = adds a=20 great deal of overhead.
Also Andy, Robin and I didn't = think

(name,=20 attributes, content, extra) =3D parse
goobervalue =3D=20 attributes["goober"]
for c in content:
   =20 doSomethingWith(c)

was really that unpleasant to work with. =  =20 However it might be
nice to do something cleaner = like

goobervalue =3D=20 parse.goober
for c in parse:
    = doSomethingWith(c)

But=20 if implemented in python I suspect you'd see
a noticable = performance=20 hit.

Good luck!

   -- Aaron = Watters

Eric van=20 Riet Paap wrote:
Hi,
 
I'm working on some small additions = to your=20 pyRXP package. So far I only have one useful function. Perhaps you = can put=20 in the next version of pyRXP if you find is worthwhile! The one = function I=20 have currently convert a pyRXP tuple back to XML (for saving xml), = this is=20 very handy when you modify the tuple after parsing it with pyRXP) . = The=20 source it very small, the zip file somewhat large (for what it does) = because=20 some large xml files are embedded for unittesting. Another thing I = plan add=20 is a convertor for pyRXP tuples to an object-tree where the goal is = to=20 accessing the data is as straigtforward as possible. pyRXP tuples = are very=20 clean,small,etc. but accessing them is not really clean=20 looking.
 
All comments are = welcome!
 
kind regards,
Eric van Riet paap
Utrecht, The = Netherlands
 

------=_NextPart_000_000B_01C29A33.66989340-- From reportlab-users@reportlab.com Mon Dec 2 23:21:06 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Mon, 2 Dec 2002 23:21:06 -0000 Subject: [reportlab-users] Spider plot checked in Message-ID: Anyone interested will find the beginnings of a 'spider' plot (also known as a "radar" plot") in reportlab/graphics/charts/spider.py. Execute the script and it will generate a spider.pdf to show you how it works. I did this for a customer demo, no promises when all the labels and gridlines etc. get added :-) Thanks, Andy From reportlab-users@reportlab.com Tue Dec 3 08:32:37 2002 From: reportlab-users@reportlab.com (Dan Wolfe) Date: Tue, 03 Dec 2002 00:32:37 -0800 Subject: [reportlab-users] Changing PDF margins? Message-ID: Howdy, I'm a relative newbie to report lab and PDF generation, and have a question that I'm hoping someone might be able to answer or at least point me in the right direction... I'm creating a double sided document that when printed needs to line up with it's counterpart on the other side. While I can adjust the margin offsets of the first and second pages in the PDF document to compensate, the problem is that the offsets are not the same for every printer. And since the documents go to a bank of printers, there's no way to know which printer the job will go to when the document is created.... and even then it might change depending on the circumstances. What I'm hoping I can do is make a master copy with no offsets, and then tweak the offsets depending on which printer the job is being sent to. Is there a way of tweaking the PDF margins after the PDF is created? Or do I need to use PageCatcher to do this? Thanks for any advice/pointers you can provide. - Dan Wolfe From reportlab-users@reportlab.com Tue Dec 3 09:05:44 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Tue, 3 Dec 2002 10:05:44 +0100 Subject: [reportlab-users] Changing PDF margins? In-Reply-To: Message-ID: <67AD717E-069E-11D7-B25B-00039345C610@darwin.in-berlin.de> Dan Wolfe: > What I'm hoping I can do is make a master copy with no offsets, and > then tweak the offsets depending on which printer the job is being > sent to. Is there a way of tweaking the PDF margins after the PDF is > created? Or do I need to use PageCatcher to do this? Very briefly: reusing existing PDF files with ReportLab technology today implies purchasing a PageCatcher license, yes, and it should be able to solve your problem, too. I.e. iff you have a comprehen- sive list of offsets. Someone on this list started to compile such a list maybe a year ago or so. Due to a "provider switch" for this mailing list, the old archives might not be easily available, though... I hope, Andy or someone can point them out to you. Regards, Dinu -- Dinu C. Gherman ...................................................................... "Political satire became obsolete when Henry Kissinger was awarded the Nobel Peace Prize." (Tom Lehrer) From reportlab-users@reportlab.com Tue Dec 3 09:47:23 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Tue, 3 Dec 2002 09:47:23 -0000 Subject: [reportlab-users] Changing PDF margins? In-Reply-To: Message-ID: > What I'm hoping I can do is make a master copy with no offsets, and > then tweak the offsets depending on which printer the job is being sent > to. Is there a way of tweaking the PDF margins after the PDF is > created? Or do I need to use PageCatcher to do this? > > Thanks for any advice/pointers you can provide. > > - Dan Wolfe I see 3 approaches: (1) Use PageCatcher to rewrite the files (2) There are a number of 'advanced' PDF features which you could set with an extra line or two of code which may help. Each page has a 'MediaBox', which we set with our 'page size', and two more we don't bother with called the CropBox and BleedBox. Also, one or two people have been working with embedding printer-specific tray commands, which open up the possibility of embedding "it the printer is x, do y" inside the PDF. If you have time to do the experiments and look at the PDF spec, we would be happy to post some code here to show you how to tweak these. But I haven't done it myself. (3) As a third route I would suggest parameterizing your report-generator script so that by default it makes the 'master', but can also make them for a specific printer. Whether you do (1) or (3) you still have the choice of generating one copy for each possible printer up front, or generating the adjusted one on-demand. Thanks, Andy From reportlab-users@reportlab.com Tue Dec 3 17:03:09 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Tue, 3 Dec 2002 18:03:09 +0100 Subject: [reportlab-users] Spider plot checked in In-Reply-To: Message-ID: <19875954-06E1-11D7-B767-00039345C610@darwin.in-berlin.de> Andy Robinson: > Anyone interested will find the beginnings of a 'spider' > plot (also known as a "radar" plot") in > reportlab/graphics/charts/spider.py. Execute the script > and it will generate a spider.pdf to show you how it works. Nice. The real challenge with this is, of course, multiple data series of different lengths plus circular axes, which would also be useful for polar plots. Dinu -- Dinu C. Gherman ...................................................................... A brief history of America: http://BowlingForColumbine.com/media/clips From reportlab-users@reportlab.com Tue Dec 3 17:24:41 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Tue, 3 Dec 2002 17:24:41 -0000 Subject: [reportlab-users] Spider plot checked in In-Reply-To: <19875954-06E1-11D7-B767-00039345C610@darwin.in-berlin.de> Message-ID: > Nice. The real challenge with this is, of course, multiple data > series of different lengths plus circular axes, which would also > be useful for polar plots. This one had exactly what was needed for a customer demo so I will happily leave that challenge to others, or to 'next time'. In the meantime I submit that (a) spider plots are a deranged sociologists' adaptation of a bar or line plot anyway, carry less information and have many gotchas (b) anyone calling it with negative numbers should be shot (c) anyone calling it with different length series should be hung, drawn, quartered and then finally shot :-) :-) From reportlab-users@reportlab.com Tue Dec 3 18:23:58 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Tue, 3 Dec 2002 18:23:58 +0000 Subject: [reportlab-users] Spider plot checked in In-Reply-To: References: <19875954-06E1-11D7-B767-00039345C610@darwin.in-berlin.de> Message-ID: In article , Andy Robinson writes >> Nice. The real challenge with this is, of course, multiple data >> series of different lengths plus circular axes, which would also >> be useful for polar plots. > >This one had exactly what was needed for a customer demo so >I will happily leave that challenge to others, or to 'next >time'. In the meantime I submit that >(a) spider plots are a deranged sociologists' adaptation of a bar > or line plot anyway, carry less information and have many > gotchas >(b) anyone calling it with negative numbers should be shot >(c) anyone calling it with different length series should > be hung, drawn, quartered and then finally shot :-) > >:-) transparency is available with PDF 1.4, but sadly it has more than just alpha ie there's shape which somehow controls the blending at the edges. If we had access to the internal rendering engine we could do the same in other models. All the smart people in the Gnome/Mozilla world seem unable to make libart work well at bitmap intersections. I know that PDF uses a fixed point representation, but that just puts off the evil day when you have to decide what things cross and what don't; when that day comes you need to go onto the grid and the set of all grid crossings is of zero measure in the original space so then you need to ........ zzzzz -- Robin Becker From reportlab-users@reportlab.com Tue Dec 3 19:23:06 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Tue, 03 Dec 2002 20:23:06 +0100 Subject: [reportlab-users] reportlab setup patch Message-ID: <3DED049A.BE4677BB@rasselstein-hoesch.de> Dies ist eine mehrteilige Nachricht im MIME-Format. --------------5FD8FAE3D97C0043ADBB3266 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I've downloaded the latest CVS and tried to build a RPM from source. Since I have had problems I sent a patch and a recipe how-to build a reportlab-RPM from source: 1. checkout latested source code from CVS 2. cd reportlab; patch -p1 Message-ID: > transparency is available with PDF 1.4, but sadly it has more than just > alpha ie there's shape which somehow controls the blending at the edges. > > If we had access to the internal rendering engine we could do the same > in other models. All the smart people in the Gnome/Mozilla world seem > unable to make libart work well at bitmap intersections. I know that PDF > uses a fixed point representation, but that just puts off the evil day > when you have to decide what things cross and what don't; when that day > comes you need to go onto the grid and the set of all grid crossings is > of zero measure in the original space so then you need to ........ zzzzz The conclusion I draw from this is very simple. No rush to support transparency, and to paraphrase Spinal Tap, libart is one of those things "best left not understood" :-) - Andy From reportlab-users@reportlab.com Wed Dec 4 07:07:45 2002 From: reportlab-users@reportlab.com (=?iso-8859-1?Q?R=FCdiger=20M=E4hl?=) Date: Wed, 4 Dec 2002 08:07:45 +0100 Subject: [reportlab-users] add labels to axes Message-ID: <200212040707.gB477jX05434@mailgate5.cinetic.de> reportlab-users@reportlab.com schrieb am 02.12.02 16:18:11: Hi Ingo,=20 > I need 2 more labels for showing Dimension and Description to be attache= d > to each axis. >=20 > What do I have to to do =3F I can only tell you, what I am doing. here comes the snippet:=20 # Drawing dwg =3D Drawing(440,160) # Title of bar chart is the teststep dwg.add(String(50, dwg.height-MyfontSize-5, txt)) bc =3D VerticalBarChart() bc.x =3D 50 # leave space for X-Axis labels bc.y =3D 30 # leave space for Y-Axis labels bc.height =3D dwg.height - bc.y - MyfontSize - 10 bc.width =3D dwg.width - bc.x - 10 It draws a title, but it should be obvious, how to change that to your needs. HTH,=20 R=FCdiger =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F Immer die neuesten ASCII-Bilder versenden, mit WEB.DE FreeMail ist das kein Problem fur Sie. http://freemail.web.de/features/=3Fmc=3D021170 From reportlab-users@reportlab.com Wed Dec 4 07:19:48 2002 From: reportlab-users@reportlab.com (Ingo Graser) Date: Wed, 4 Dec 2002 08:19:48 +0100 (CET) Subject: [reportlab-users] add labels to axes In-Reply-To: <200212040707.gB477jX05434@mailgate5.cinetic.de> References: <200212040707.gB477jX05434@mailgate5.cinetic.de> Message-ID: <1246.28.1.42.67.1038986388.squirrel@web03.rasselstein-hoesch.de> @Rüdiger: Thank you for your answer. I will try this out. What I forgot to mention is, that I use RenderPM to make Charts in Zope. So the main Problem is, that I has to be configurable via RenderPM and the data for the string will be passed via an Python Script to the Chart. Greets, Ingo :) > reportlab-users@reportlab.com schrieb am 02.12.02 16:18:11: > > Hi Ingo, > >> I need 2 more labels for showing Dimension and Description to be >> attached to each axis. >> >> What do I have to to do ? > > I can only tell you, what I am doing. here comes the snippet: > > # Drawing > dwg = Drawing(440,160) > # Title of bar chart is the teststep > dwg.add(String(50, dwg.height-MyfontSize-5, txt)) > bc = VerticalBarChart() > bc.x = 50 # leave space for X-Axis labels > bc.y = 30 # leave space for Y-Axis labels > bc.height = dwg.height - bc.y - MyfontSize - 10 > bc.width = dwg.width - bc.x - 10 > > It draws a title, but it should be obvious, how to change that > to your needs. > > HTH, > > Rüdiger > ____________________________________________________________________________ __ > Immer die neuesten ASCII-Bilder versenden, mit WEB.DE FreeMail ist das > kein Problem fur Sie. http://freemail.web.de/features/?mc=021170 > > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users ------------------------------------- Der Inhalt dieser e-Mail ist ausschlieŒlich fr den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser e-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Ver”ffentlichung, Vervielf„ltigung oder Weitergabe des Inhalts dieser e-Mail unzul„ssig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der e-Mail in Verbindung zu setzen. The information contained in this e-mail ist intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, any from of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. Unsere e-mail Adresse hat sich ge"ndert. Wir sind aber auch weiterhin unter der alten Adresse @rasselstein-hoesch.de zu erreichen. Please note that our e-mail address has changed. Nevertheless you still can reach us by our old address @rasselstein-hoesch.de . From reportlab-users@reportlab.com Wed Dec 4 08:22:06 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Wed, 4 Dec 2002 08:22:06 -0000 Subject: [reportlab-users] add labels to axes In-Reply-To: <1246.28.1.42.67.1038986388.squirrel@web03.rasselstein-hoesch.de> Message-ID: > @Rüdiger: Thank you for your answer. I will try this out. > > What I forgot to mention is, that I use RenderPM to make Charts > in Zope. So > the main Problem is, that I has to be configurable via RenderPM and the > data for the string will be passed via an Python Script to the Chart. > > Greets, > Ingo :) When you say "RenderPM": is this the name of the Zope package, or are youe talking about our own renderPM backend to make GIFs? IMHO "RenderPM" is a REALLY bad name for the Zope package. It's the name of our pixel renderer which is just one component of reportlab/graphics. We'll have misunderstood support questions forever! Zope packagez zhould have Z in the name zo people know zat'z what zey are about, zurely? - Andy From reportlab-users@reportlab.com Wed Dec 4 09:08:06 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Wed, 4 Dec 2002 09:08:06 -0000 Subject: [reportlab-users] add labels to axes In-Reply-To: <1246.28.1.42.67.1038986388.squirrel@web03.rasselstein-hoesch.de> Message-ID: > @Rüdiger: Thank you for your answer. I will try this out. > > What I forgot to mention is, that I use RenderPM to make Charts > in Zope. So > the main Problem is, that I has to be configurable via RenderPM and the > data for the string will be passed via an Python Script to the Chart. > > Greets, > Ingo :) Ingo, I have not used the Zope package but I think it is analogous to our commercial framework. What we would do is: 1. subclass the charts 2. in thenew chart's __init__ method, make your default settings and add the new String widgets to it 3. Save that in the file system and let RenderPM configure it. Thanks, Andy From reportlab-users@reportlab.com Wed Dec 4 09:59:30 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Wed, 4 Dec 2002 10:59:30 +0100 Subject: [reportlab-users] Spider plot checked in In-Reply-To: Message-ID: <150C4C49-076F-11D7-A156-00039345C610@darwin.in-berlin.de> [Seems like I need to send this twice... D.] Andy Robinson: > This one had exactly what was needed for a customer demo so > I will happily leave that challenge to others, or to 'next > time'. In the meantime I submit that > (a) spider plots are a deranged sociologists' adaptation of a bar > or line plot anyway, carry less information and have many > gotchas > (b) anyone calling it with negative numbers should be shot > (c) anyone calling it with different length series should > be hung, drawn, quartered and then finally shot :-) Andy, I'm glad I haven't responded earlier to this message. And given the last movie I've seen recently (see below, it's sooo funny!) I better do not comment on what I assume is just supposed to be funny in the above statement. So, while I'm less convinced about sociologists in general deserving the label "mentally deranged" and might have some reasons for my ori- ginal statement, I'm chosing not to lay out anything of that here in the presence of a death penalty threat. BTW, which US state is hosting reportlab.com? ;-) And maybe I should have my DNA pre-scanned for the day when my case comes to the Inno- cence Project, http://www.innocenceproject.org ? Dinu -- Dinu C. Gherman ...................................................................... What a wonderful world: http://BowlingForColumbine.com/library/wonderful From reportlab-users@reportlab.com Wed Dec 4 11:00:17 2002 From: reportlab-users@reportlab.com (=?iso-8859-2?Q?Z=FAber_Martin?=) Date: Wed, 4 Dec 2002 12:00:17 +0100 Subject: [reportlab-users] Apache vs. reportlab.pdfgen.canvas.Canvas object Message-ID: <4AAFE176BC1364458CF2FAF34A8AA97F0ED640@kvaw01.pvt.cz> Hello, I have found one problem using the reportlab under apache. My idea is to = create PDF file downloadable from the page (similar to reportlab's demo = pages). I am using the mod_python to do this. The source code for the = page script is: import sys import reportlab.pdfgen.canvas from mod_python import apache # reaction for http request def handler(req): ... c =3D reportlab.pdfgen.canvas.Canvas("/some/file.pdf") ... When I run this under apache, the error message appears: Mod_python error "PythonHandler index" Traceback (most recent call = last): File "/usr/lib/apache/lib/python2.2/site-package/mod_python/apache.py", line = 193 in Dispatch result =3D object(req) File "/srv/www/htdocs/python/index.py", line 17, in handler AttributeError: = 'module' object has no attribute "Canvas" But when I do same call in python shell directly, the Canvas is created = and the PDF file can be written. There is no problem with permissions to = folder, because it has (for testing only) 777 access. Has someone found same problem? The system is: Athlon, 196MB RAM, 10GB HDD OS SuSE Linux 8.1 WWW: Apache 1.3.26-47 {from SuSE) mod_python: 2.7.8-74 (from SuSE) With regards, _________________________________________ =20 Martin Z=FAber ICQ#: 118121643 From reportlab-users@reportlab.com Wed Dec 4 12:07:42 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Wed, 4 Dec 2002 12:07:42 -0000 Subject: [reportlab-users] Apache vs. reportlab.pdfgen.canvas.Canvas object In-Reply-To: <4AAFE176BC1364458CF2FAF34A8AA97F0ED640@kvaw01.pvt.cz> Message-ID: > def handler(req): > ... > c = reportlab.pdfgen.canvas.Canvas("/some/file.pdf") > ... No ideas myself. Does mod_python do any lazy caching of Python modules? Try making it to 'dir' on the object reportlab.pdfgen.canvas and display some of its attibutes in HTML. Thanks, Andy From reportlab-users@reportlab.com Wed Dec 4 12:19:26 2002 From: reportlab-users@reportlab.com (=?iso-8859-2?Q?Z=FAber_Martin?=) Date: Wed, 4 Dec 2002 13:19:26 +0100 Subject: [reportlab-users] Apache vs. reportlab.pdfgen.canvas.Canvas object Message-ID: <4AAFE176BC1364458CF2FAF34A8AA97F0ED642@kvaw01.pvt.cz> Hello, I have 'dir'ed the reportlab.pdfgen.canvas module - it seems that there = are all attributes and objects, except Canvas. Martin > -----Original Message----- > From: Andy Robinson [mailto:andy@reportlab.com]=20 > Sent: Wednesday, December 04, 2002 1:08 PM > To: reportlab-users@reportlab.com > Subject: RE: [reportlab-users] Apache vs.=20 > reportlab.pdfgen.canvas.Canvas object >=20 >=20 > > def handler(req): > > ... > > c =3D reportlab.pdfgen.canvas.Canvas("/some/file.pdf") > > ... >=20 > No ideas myself. >=20 > Does mod_python do any lazy caching of Python modules? > Try making it to 'dir' on the object reportlab.pdfgen.canvas=20 > and display some of its attibutes in HTML. >=20 > Thanks, >=20 > Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com=20 > http://two.pairlist.net/mailman/listinfo/repor> tlab-users >=20 From reportlab-users@reportlab.com Wed Dec 4 12:23:55 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Wed, 4 Dec 2002 12:23:55 -0000 Subject: [reportlab-users] pyRXP -> XML In-Reply-To: <003a01c29a24$9cada100$9700000a@ericowxkwws9hl> Message-ID: Eric, I just unblocked your attachment from our mailing list (it got spam filtered due to size). If anyone else wants to send files over 40k, the best procedure is: 1. anonymous ftp to ftp.reportlab.com/incoming/ 2. email the liist to tell us about it Did you know we have a module pyRXP/examples/xmlutils.py in the CVS tree and distro? I think that's the home for this function and will try to add it there at the weekend. Since pyRXP is a tool for speed freaks, I will suggest a couple of changes: 1. it could probably go faster by building a list of strings which is passed around, then doing 'join'. 2. we need to be careful with quoting as stuff might already be quoted, depending on your parser options. I have a regex somewhere to find '&' which is not followed b 'amp;' and so on. I can see 3 options: (a) quote stuff (fast), (b) never quote (fastest), (c) quote stuff that needs quoting (a tad slower but safest). Also, the object tree you want is already there in our TagWrapper class. We use it every day and the syntax is very pleasant. The idea is that it only converts nodes to objects when you access them. It could certainly have more features and I'd welcome testing or additions. Alex Martelli also gave me many nice ideas on iterators and there are some thoughts on useful utilities in the back of the pyRXP manual. I just realised the manual is included in the snapshot on our download page, but in Report Markup Language which is commercial. Users can built this with a nag line on each page, but there's a finished copy here: http://www.reportlab.com/docs/pyRXP_Documentation.pdf Thanks, Andy -----Original Message----- From: reportlab-users-admin@reportlab.com [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Eric van Riet Paap Sent: 02 December 2002 17:02 To: reportlab-users@reportlab.com Subject: [reportlab-users] pyRXP -> XML Hi, I'm working on some small additions to your pyRXP package. So far I only have one useful function. Perhaps you can put in the next version of pyRXP if you find is worthwhile! The one function I have currently convert a pyRXP tuple back to XML (for saving xml), this is very handy when you modify the tuple after parsing it with pyRXP) . The source it very small, the zip file somewhat large (for what it does) because some large xml files are embedded for unittesting. Another thing I plan add is a convertor for pyRXP tuples to an object-tree where the goal is to accessing the data is as straigtforward as possible. pyRXP tuples are very clean,small,etc. but accessing them is not really clean looking. All comments are welcome! kind regards, Eric van Riet paap Utrecht, The Netherlands From reportlab-users@reportlab.com Wed Dec 4 16:31:57 2002 From: reportlab-users@reportlab.com (Eric van Riet Paap) Date: Wed, 4 Dec 2002 17:31:57 +0100 Subject: [reportlab-users] new pyRXPaddons Message-ID: <001f01c29bb2$b0f2eeb0$9700000a@ericowxkwws9hl> This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C29BBB.0BDBA990 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I've created a new version of pyRXPaddons for downloading at=20 http://www.vanrietpaap.com/eric/downloads/pyRXPaddons.zip This version has two functions: - RXP2XML(RXPtuple) Convert RXPtuple to XML string. so you can write import pyRXP from pyRXPaddons import RXP2XML rxp =3D pyRXP.Parser().parse('testC = node') print RXP2XML(rxp) - Nodes(RXPtuple) Generator to loop of over all nodes in a RXPtuple (hierarchy). = so you can write: import pyRXP from pyRXPaddons import Node rxp =3D pyRXP.Parser().parse('testC = node') for node in Nodes(rxp): print 'name:',node[0] How you find it useful! - Eric van Riet paap, Utrecht, The Netherlands ------=_NextPart_000_001C_01C29BBB.0BDBA990 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I've created a new version of = pyRXPaddons for=20 downloading at
http:/= /www.vanrietpaap.com/eric/downloads/pyRXPaddons.zip
 
This version has two = functions:
 
    - = RXP2XML(RXPtuple)
        = Convert=20 RXPtuple to XML string. so you can write
       =20     import pyRXP
          &nbs= p; from=20 pyRXPaddons import RXP2XML
          &nbs= p; rxp=20 =3D pyRXP.Parser().parse('<a><b>test</b><c>C=20 node</c></a>')
            print=20 RXP2XML(rxp)
 
    - = Nodes(RXPtuple)
        = Generator to=20 loop of over all nodes in a RXPtuple (hierarchy). so you can = write:
       =20     import pyRXP
          &nbs= p; from=20 pyRXPaddons import Node
          &nbs= p; rxp=20 =3D pyRXP.Parser().parse('<a><b>test</b><c>C=20 node</c></a>')
       =20     for node in Nodes(rxp):
       =20         print 'name:',node[0]
 
How you find it useful!
 
- Eric van Riet paap, Utrecht, The Netherlands
 
------=_NextPart_000_001C_01C29BBB.0BDBA990-- From reportlab-users@reportlab.com Wed Dec 4 17:26:13 2002 From: reportlab-users@reportlab.com (Aaron Watters) Date: Wed, 04 Dec 2002 12:26:13 -0500 Subject: [reportlab-users] Apache vs. reportlab.pdfgen.canvas.Canvas object References: <4AAFE176BC1364458CF2FAF34A8AA97F0ED642@kvaw01.pvt.cz> Message-ID: <3DEE3AB5.7060409@reportlab.com> --------------060006020402020104010206 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Even if you fix this I don't recommend you use modpython for this. The problem is that the reportlab packages are designed to work primarily in transient processes, and they may (probably will) cause memory leaks in apache if you use mod apache. Of course, since the apache processes commit suicide every so often maybe you don't have to worry about it (I don't know enough about it). Another problem may be that the reportlab modules are not thread safe, but that is only a problem if modpython uses threading. Use a cgi script instead, maybe? (or launch a subprocess in some other manner?) I don't think you'll see too much of a performance difference. -- Aaron Watters Zúber Martin wrote: >Hello, > >I have 'dir'ed the reportlab.pdfgen.canvas module - it seems that there are all attributes and objects, except Canvas. > >Martin > >>-----Original Message----- >>From: Andy Robinson [mailto:andy@reportlab.com] >>Sent: Wednesday, December 04, 2002 1:08 PM >>To: reportlab-users@reportlab.com >>Subject: RE: [reportlab-users] Apache vs. >>reportlab.pdfgen.canvas.Canvas object >> >> >>>def handler(req): >>> ... >>> c = reportlab.pdfgen.canvas.Canvas("/some/file.pdf") >>> ... >>> >>No ideas myself. >> >>Does mod_python do any lazy caching of Python modules? >>Try making it to 'dir' on the object reportlab.pdfgen.canvas >>and display some of its attibutes in HTML. >> >>Thanks, >> >>Andy >>_______________________________________________ >>reportlab-users mailing list >>reportlab-users@reportlab.com >>http://two.pairlist.net/mailman/listinfo/repor> tlab-users >> >_______________________________________________ >reportlab-users mailing list >reportlab-users@reportlab.com >http://two.pairlist.net/mailman/listinfo/reportlab-users > --------------060006020402020104010206 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Even if you fix this I don't recommend you use modpython for this.

The problem is that the reportlab packages are designed to work
primarily in transient processes, and they may (probably will) cause
memory leaks in apache if you use mod apache.  Of course, since
the apache processes commit suicide every so often maybe you
don't have to worry about it (I don't know enough about it).

Another problem may be that the
reportlab modules are not thread safe, but that is only a problem if
modpython uses threading.

Use a cgi script instead, maybe? (or launch a subprocess in
some other manner?)  I don't think you'll see too much of
a performance difference.

   -- Aaron Watters

Zúber Martin wrote:
Hello,

I have 'dir'ed the reportlab.pdfgen.canvas module - it seems that there are all attributes and objects, except Canvas.

Martin

-----Original Message-----
From: Andy Robinson [mailto:andy@reportlab.com]
Sent: Wednesday, December 04, 2002 1:08 PM
To: reportlab-users@reportlab.com
Subject: RE: [reportlab-users] Apache vs.
reportlab.pdfgen.canvas.Canvas object


def handler(req):
...
c = reportlab.pdfgen.canvas.Canvas("/some/file.pdf")
...
No ideas myself.

Does mod_python do any lazy caching of Python modules?
Try making it to 'dir' on the object reportlab.pdfgen.canvas
and display some of its attibutes in HTML.

Thanks,

Andy
_______________________________________________
reportlab-users mailing list
reportlab-users@reportlab.com
http://two.pairlist.net/mailman/listinfo/repor> tlab-users

_______________________________________________
reportlab-users mailing list
reportlab-users@reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users


--------------060006020402020104010206-- From reportlab-users@reportlab.com Wed Dec 4 20:15:09 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Wed, 04 Dec 2002 21:15:09 +0100 Subject: [reportlab-users] Zope RenderPM vs. commercial package Message-ID: <3DEE624D.30045292@rasselstein-hoesch.de> Hi reportlab, I read your mail today that reportlab has a commerical package for Zope. Where can I read more information about that ? Maybe may development of Zope-RenderPM can be superseeded with your commercial package. Regards, Dirk From reportlab-users@reportlab.com Thu Dec 5 03:20:26 2002 From: reportlab-users@reportlab.com (Stuart Bishop) Date: Thu, 5 Dec 2002 14:20:26 +1100 Subject: [reportlab-users] pyRXP vs ONIX DTD Message-ID: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> I'm trying to use pyRXP to validate ONIX documents that I am generating. However, I am getting lots of 'not a valid 8-bit XML character' warnings unless I set the IgnoreEntities flag to true. The ONIX DTD looks fine to me, although I'm no expert. The first character that is picked up is "Œ" , which seems valid to my cursory reading of the XML 1.0 spec. Can anyone confirm if this is a problem with the ONIX DTD, or a bug or limitation of the RXP engine being used by pyRXP? Similar issues appear to have been raised in the past with regard to Docbook, with the solution being to build RXP with unicode support. I'd guess that the DTD is being retrieved by the C engine, so would have no bearing on Python's Unicode support. I'd really like to be able to validate with maximum paranoia, as I'm generating many ONIX records from untrusted source data. Minimal example: import pyRXP ONIX = u''' ''' pyRXP.Parser().parse(ONIX) And the output: Traceback (most recent call last): File "bug.py", line 7, in ? pyRXP.Parser().parse(ONIX) pyRXP.Error: Error: 0x152 is not a valid 8-bit XML character in entity "xhtml-special" at line 33 char 25 of http://www.editeur.org/onix/2.0/reference/xhtml-special.ent in entity "MainModule" at line 2059 char 16 of http://www.editeur.org/onix/2.0/reference/onix-international.elt in unnamed entity at line 625 char 13 of http://www.editeur.org/onix/2.0/reference/onix-international.dtd error return=1 0x152 is not a valid 8-bit XML character Parse Failed! -- Stuart Bishop http://shangri-la.dropbear.id.au/ From reportlab-users@reportlab.com Thu Dec 5 09:25:03 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Thu, 5 Dec 2002 09:25:03 +0000 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> Message-ID: <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> In article <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au>, Stuart Bishop writes >I'm trying to use pyRXP to validate ONIX documents that I am >generating. However, I am getting lots of 'not a valid 8-bit XML >character' warnings unless I set the IgnoreEntities flag to true. The >ONIX DTD looks fine to me, although I'm no expert. The first character >that is picked up is "Œ" , which seems valid to my cursory reading >of the XML 1.0 spec. > >Can anyone confirm if this is a problem with the ONIX DTD, or a bug or >limitation of the RXP engine being used by pyRXP? Similar issues appear >to have been raised in the past with regard to Docbook, with the >solution being to build RXP with unicode support. >I'd guess that the DTD is being retrieved by the C engine, so would >have no bearing on Python's Unicode support. I'd really like to be able >to validate with maximum paranoia, as I'm generating many ONIX records >from untrusted source data. >Minimal example: ...... Well I think the error message says it all. The document says it's utf-8 and then tries to expand a non-8 bit char. I suppose we have to say that's impossible. >>> pyRXP.Parser()("ÿ") ('a', None, ['\xff'], None) >>> pyRXP.Parser()("Ā") Traceback (most recent call last): File "", line 1, in ? Error: Error: 0x100 is not a valid 8-bit XML character in unnamed entity at line 1 char 10 of [unknown] I'm not an expert on XML that's to big and vague a subject for a simple person like myself. The poor parser is in 8 bit only at present so it will not handle entity declarations like I assume there is some universal encoding in which this is understandable. -- Robin Becker From reportlab-users@reportlab.com Thu Dec 5 09:59:51 2002 From: reportlab-users@reportlab.com (Marius Gedminas) Date: Thu, 5 Dec 2002 11:59:51 +0200 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> Message-ID: <20021205095951.GA26876@codeworks.lt> On Thu, Dec 05, 2002 at 09:25:03AM +0000, Robin Becker wrote: > ...... Well I think the error message says it all. The document says > it's utf-8 and then tries to expand a non-8 bit char. I suppose we > have to say that's impossible. > > >>> pyRXP.Parser()("ÿ") > ('a', None, ['\xff'], None) > >>> pyRXP.Parser()("Ā") > Traceback (most recent call last): > File "", line 1, in ? > Error: Error: 0x100 is not a valid 8-bit XML character > in unnamed entity at line 1 char 10 of [unknown] Um, as far as I remember XML, numeric character entities are independent from the document's charset and are always interpreted as Unicode character codes. > I'm not an expert on XML that's to big and vague a subject for a simple > person like myself. The poor parser is in 8 bit only at present so it > will not handle entity declarations like > > Then it's not an XML parser, is it? > I assume there is some universal encoding in which this is understandable. Unicode (internal representation doesn't matter -- UTF-8, UTF-16, UTF-32...). It's been some time since I last read XML specs, so I could be very wrong, but I seem to remember that XML is basically inseparable from Unicode. HTH, Marius Gedminas -- Hanlon's Razor: Never attribute to malice that which is adequately explained by stupidity. From reportlab-users@reportlab.com Thu Dec 5 10:25:59 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Thu, 5 Dec 2002 10:25:59 +0000 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <20021205095951.GA26876@codeworks.lt> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> <20021205095951.GA26876@codeworks.lt> Message-ID: <027MqKA3my79Eww0@jessikat.demon.co.uk> In article <20021205095951.GA26876@codeworks.lt>, Marius Gedminas writes ...... >It's been some time since I last read XML specs, so I could be very >wrong, but I seem to remember that XML is basically inseparable from >Unicode. > >HTH, >Marius Gedminas You're probably right, but that's why we have utf-8 ie an 8 bit encoding. The right thing to do is to switch this to 16 bit or perhaps 32 bit or 64 bit, handle all known BOM's and then watch paint dry. Eight bit encodings were always sufficient, but modernists want to use up all their new computing power :). pyRXP is open source so anybody could try and switch it to 16 bit. I won't be doing that immediately unless Andy says so. I've not looked too deeply at RXP recently so I can't say what would be the likely impact on the interface ie would we want to provide Parser8/Parser16 etc and attempt to have multiple versions of RXP available. -- Robin Becker From reportlab-users@reportlab.com Thu Dec 5 10:32:53 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Thu, 5 Dec 2002 10:32:53 -0000 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <20021205095951.GA26876@codeworks.lt> Message-ID: > It's been some time since I last read XML specs, so I could be very > wrong, but I seem to remember that XML is basically inseparable from > Unicode. There were 8-bit and 16-bit options when building pyRXP. AFAIR it passed 100% of the unicode tet suite in 16 bit mode and only passed the non-Unicode-related ones in 8 bit. If someone wants to play around with 16 bit builds and learn more about it, that's great. Personally I still believe that Python has its own Unicode library which should do conversions explicitly. Most Python apps are not yet using Unicode strings. But if someone can suggest a compatibility route I would welcome it. Thanks, Andy From reportlab-users@reportlab.com Thu Dec 5 10:36:49 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Thu, 5 Dec 2002 10:36:49 -0000 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <027MqKA3my79Eww0@jessikat.demon.co.uk> Message-ID: > pyRXP is open source so anybody could try and switch it to 16 bit. I > won't be doing that immediately unless Andy says so. I've not looked too > deeply at RXP recently so I can't say what would be the likely impact on > the interface ie would we want to provide Parser8/Parser16 etc and > attempt to have multiple versions of RXP available. I understood it was currently a compile-time option. I certainly will not accept a change which increases the processing time and memory requirements for the average 8-bit user. But having a choice of two parsers would be great and patches welcome on this. Robin will NOT be working on it unless it actually bites us. We are not an XML tools company, we just needed better XML tools to do our job :-) You can also solve your problem by scanning the input file for 4 byte unicode entities and replacing them with UTF8 ones in one very fast pass with a regex. - Andy From reportlab-users@reportlab.com Thu Dec 5 12:17:22 2002 From: reportlab-users@reportlab.com (Marius Gedminas) Date: Thu, 5 Dec 2002 14:17:22 +0200 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <027MqKA3my79Eww0@jessikat.demon.co.uk> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> <20021205095951.GA26876@codeworks.lt> <027MqKA3my79Eww0@jessikat.demon.co.uk> Message-ID: <20021205121722.GA27836@codeworks.lt> On Thu, Dec 05, 2002 at 10:25:59AM +0000, Robin Becker wrote: > In article <20021205095951.GA26876@codeworks.lt>, Marius Gedminas > writes > ...... > >It's been some time since I last read XML specs, so I could be very > >wrong, but I seem to remember that XML is basically inseparable from > >Unicode. > > > >HTH, > >Marius Gedminas > > You're probably right, but that's why we have utf-8 ie an 8 bit > encoding. The right thing to do is to switch this to 16 bit or perhaps > 32 bit or 64 bit, handle all known BOM's and then watch paint dry. Eight > bit encodings were always sufficient, but modernists want to use up all > their new computing power :). The problem is character entities like 'Ӓ', right? So why not just translate them to UTF-8 strings instead of throwing exceptions? That's assuming pyRXP works with UTF-8 internally; I'm not familiar with it, and probably should abstain from discussing things I know very little about. I only wanted to clarify that ✏ is OK even when the document is declared as . See http://www.w3.org/TR/REC-xml#dt-charref > pyRXP is open source so anybody could try and switch it to 16 bit. (I'm not sure that's a good idea; Unicode is 20.1 bits wide, and UTF-16 combines all the disadvantages of both UTF-8 and UTF-32.) Marius Gedminas -- If you can't understand it, it is intuitively obvious. From reportlab-users@reportlab.com Thu Dec 5 17:07:34 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Thu, 5 Dec 2002 17:07:34 -0000 Subject: [reportlab-users] Zope RenderPM vs. commercial package In-Reply-To: <3DEE624D.30045292@rasselstein-hoesch.de> Message-ID: > I read your mail today that reportlab has a commerical > package for Zope. No we don't. I would never bother trying to sell stuff to the Zope community. We have some commercial components we call 'Diagra' which are sold as part of larger solutions. > Where can I read more information about that ? Maybe may development > of Zope-RenderPM can be superseeded with your commercial package. I have another hope in mind: that we can mutate Diagra into something where the Python community gets a really good 'chart server' framework usable with CGI, mod_python, Twisted, Zope etc etc, but we well a 'drawing design tool' and a 'chart serve' for others who do not wish to know about Python. This might mean that a lot more Zope users might get involved in writing new chart types. I think the population of people wanting to do nice graphics on the web is larger than in PDF. The only problem with renderPM is the name; we use that name for one internal component or our library and you use it for a higher level product with our library inside it. I think this is confusing. If we can come up with something cool-sounding that implies "reportlab", "graphics" and "Zope" would you consider it? - Andy From reportlab-users@reportlab.com Thu Dec 5 18:43:03 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Thu, 5 Dec 2002 18:43:03 +0000 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <20021205121722.GA27836@codeworks.lt> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> <20021205095951.GA26876@codeworks.lt> <027MqKA3my79Eww0@jessikat.demon.co.uk> <20021205121722.GA27836@codeworks.lt> Message-ID: In article <20021205121722.GA27836@codeworks.lt>, Marius Gedminas writes ........ > >The problem is character entities like 'Ӓ', right? So why not just >translate them to UTF-8 strings instead of throwing exceptions? That's >assuming pyRXP works with UTF-8 internally; I'm not familiar with it, >and probably should abstain from discussing things I know very little >about. I only wanted to clarify that ✏ is OK even when the >document is declared as . > >See http://www.w3.org/TR/REC-xml#dt-charref > >> pyRXP is open source so anybody could try and switch it to 16 bit. > >(I'm not sure that's a good idea; Unicode is 20.1 bits wide, and UTF-16 >combines all the disadvantages of both UTF-8 and UTF-32.) > >Marius Gedminas I'm not sure I understand this really as I'm not an expert on encodings. And certainly not the author of RXP. Are you saying there's a unique utf-8 version of these 16bit things? I had thought there were some problems. Is the byte sequence always defined bigendian/littleendian? -- Robin Becker From reportlab-users@reportlab.com Thu Dec 5 19:39:58 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Thu, 05 Dec 2002 20:39:58 +0100 Subject: [reportlab-users] Zope RenderPM vs. commercial package References: Message-ID: <3DEFAB8E.12ECC8B@rasselstein-hoesch.de> > The only problem with renderPM is the name; we use that name > for one internal component or our library and you use it for > a higher level product with our library inside it. I think > this is confusing. If we can come up with something cool-sounding > that implies "reportlab", "graphics" and "Zope" would you consider > it? Yes I agree. The project started with intention to use the RenderPM.py for generating charts, but it growed. Now it used RenderSVG and RenderPDF and the name is no longer a good idea. any cool suggestions are welcome. Regards, Dirk From reportlab-users@reportlab.com Thu Dec 5 20:01:49 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Thu, 5 Dec 2002 20:01:49 +0000 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <20021205121722.GA27836@codeworks.lt> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> <20021205095951.GA26876@codeworks.lt> <027MqKA3my79Eww0@jessikat.demon.co.uk> <20021205121722.GA27836@codeworks.lt> Message-ID: In article <20021205121722.GA27836@codeworks.lt>, Marius Gedminas writes At http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 I see this table U-00000000 - U-0000007F: 0xxxxxxx U-00000080 - U-000007FF: 110xxxxx 10xxxxxx U-00000800 - U-0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx U-00010000 - U-001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx U-00200000 - U-03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx U-04000000 - U-7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx so I guess I could try and hack RXP to just accept this table for any of the high end characters. I'm not sure I would want to do on the fly translation for all files though. Somehow I had assumed that could not be done. Can the python stuff do this for us? >(I'm not sure that's a good idea; Unicode is 20.1 bits wide, and UTF-16 >combines all the disadvantages of both UTF-8 and UTF-32.) > >Marius Gedminas -- Robin Becker From reportlab-users@reportlab.com Thu Dec 5 20:25:26 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Thu, 5 Dec 2002 21:25:26 +0100 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: Message-ID: Robin Becker: > Are you saying there's a unique utf-8 version of these 16bit things? I > had thought there were some problems. Is the byte sequence always > defined bigendian/littleendian? AFAIK there is UTF-16LE and UTF-16BE... and then there is XML 1.1 which covers Unicode > 2.0 and complicates things further. Would be interesting to know how much Python's XML support really cares about Unicode specifics... Dinu -- Dinu C. Gherman ...................................................................... "Any sufficiently advanced technology is indistinguishable from magic." (Arthur C. Clarke) From reportlab-users@reportlab.com Fri Dec 6 08:08:24 2002 From: reportlab-users@reportlab.com (Marius Gedminas) Date: Fri, 6 Dec 2002 10:08:24 +0200 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> <20021205095951.GA26876@codeworks.lt> <027MqKA3my79Eww0@jessikat.demon.co.uk> <20021205121722.GA27836@codeworks.lt> Message-ID: <20021206080823.GA612@codeworks.lt> On Thu, Dec 05, 2002 at 06:43:03PM +0000, Robin Becker wrote: > >> pyRXP is open source so anybody could try and switch it to 16 bit. > > > >(I'm not sure that's a good idea; Unicode is 20.1 bits wide, and UTF-16 > >combines all the disadvantages of both UTF-8 and UTF-32.) > > > >Marius Gedminas > I'm not sure I understand this really as I'm not an expert on encodings. > And certainly not the author of RXP. > > Are you saying there's a unique utf-8 version of these 16bit things? UTF-8 can technically express codes from 0 to 2^31 - 1, although currently both Unicode and ISO 10646 limit their codespaces to 0..0x10fff > I > had thought there were some problems. Is the byte sequence always > defined bigendian/littleendian? UTF-8 is endian-independent, that's one of its advantages (UTF-16 and UTF-32, and also UCS-2 and UCS-4 come in two flavours -- big-endian and little-endian. BTW, UCS-4 is identical to UTF-32, and UCS-2 differs from UTF-16 in that UTF-16 can express characters above 0xffff using surrogate pairs, while UCS-2 is limited to Basic Multilingual Plane (characters 0-0xffff)). Aren't encodings fun? It's almost as bad as understanding time measurements (leap seconds, oh my...). Marius Gedminas -- Those parts of the system that you can hit with a hammer (not advised) are called hardware; those program instructions that you can only curse at are called software. -- Levitating Trains and Kamikaze Genes: Technological Literacy for the 1990's. From reportlab-users@reportlab.com Fri Dec 6 08:50:54 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Fri, 6 Dec 2002 09:50:54 +0100 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <20021206080823.GA612@codeworks.lt> Message-ID: Marius Gedminas: > Aren't encodings fun? It's almost as bad as understanding time > measurements (leap seconds, oh my...). Here is a lot of info about unicode transformation formats: http://czyborra.com/utf/ Dinu -- Dinu C. Gherman ...................................................................... "Any sufficiently advanced technology is indistinguishable from magic." (Arthur C. Clarke) From reportlab-users@reportlab.com Fri Dec 6 09:13:13 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Fri, 6 Dec 2002 09:13:13 +0000 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <20021206080823.GA612@codeworks.lt> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> <20021205095951.GA26876@codeworks.lt> <027MqKA3my79Eww0@jessikat.demon.co.uk> <20021205121722.GA27836@codeworks.lt> <20021206080823.GA612@codeworks.lt> Message-ID: <9irOvWApoG89EwIY@jessikat.fsnet.co.uk> In article <20021206080823.GA612@codeworks.lt>, Marius Gedminas writes ...... >> >> Are you saying there's a unique utf-8 version of these 16bit things? > >UTF-8 can technically express codes from 0 to 2^31 - 1, although >currently both Unicode and ISO 10646 limit their codespaces to >0..0x10fff > yes I knew that in theory, but thought there were some ambiguity problems in conversion back and forth. I saw another table y'day saying that shortest aren't required. http://www.unicode.org/versions/corrigendum1.html Anyhow I guess the question arises as to whether there's a convenient description of an acceptable algorithm that maps the decimal 0 <= dddddd <= 2^31-1 I assume we need two flavours, one for a bigendian and one for a little endian, but again perhaps I'm overlooking something obvious. The nice table from the above Scalar Value UTF-16 1st Byte 2nd Byte 3rd Byte 4th Byte 00000000 0xxxxxxx 00000000 0xxxxxxx 0xxxxxxx 00000yyy yyxxxxxx 00000yyy yyxxxxxx 110yyyyy 10xxxxxx zzzzyyyy yyxxxxxx zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx 000uuuuu zzzzyyyy 110110ww wwzzzzyy 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx yyxxxxxx 110111yy yyxxxxxx * Where uuuuu = wwww + 1 (to account for addition of 1000016 as in Section 3.7, Surrogates). seems only to go to 2^16-1, but am I always to assume the bigendian ordering for the Scalar Value? ...... >UTF-8 is endian-independent, that's one of its advantages (UTF-16 and >UTF-32, and also UCS-2 and UCS-4 come in two flavours -- big-endian and >little-endian. BTW, UCS-4 is identical to UTF-32, and UCS-2 differs >from UTF-16 in that UTF-16 can express characters above 0xffff using >surrogate pairs, while UCS-2 is limited to Basic Multilingual Plane >(characters 0-0xffff)). > >Aren't encodings fun? It's almost as bad as understanding time >measurements (leap seconds, oh my...). ..... oh yes indeed -- Robin Becker From reportlab-users@reportlab.com Fri Dec 6 22:33:23 2002 From: reportlab-users@reportlab.com (Robert Krieg) Date: Fri, 6 Dec 2002 14:33:23 -0800 Subject: [reportlab-users] Creating Column Headers for each page using Platypus Tables Message-ID: <38FC1F2515BFFD4E904B82A1C2A047B89BFA78@oak2kmail.stcg.net> This is a multi-part message in MIME format. ----=_NextPart_ST_14_18_59_Friday_December_06_2002_31441 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello All, =20 I am writing a python program using the reportLab modules that connects to an SQL database, returns results from the users query, then outputs results to a .pdf file using Platypus tables.py and the Platypus simpleDocTemplate implementation method. This process works beautifully. The only caveat I am experiencing is the output of Column Header info. As it is, the platypus table method only inserts these column header values in the first row of the table on the first page. I am looking to have these Column Header values display in the first row of all pages. I am having some difficulty with this as I am unsure how to know at which point the table information will "flow" to the subsequent pages. Does anyone have an idea how I might approach this requirement. Any input is graciously received. Thanks. Rob =20 ----=_NextPart_ST_14_18_59_Friday_December_06_2002_31441 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello All,

 

I am writing a python program using the reportLab module= s that connects to an SQL database, returns results from the users query, then out= puts results to a .pdf file using Platypus tables.py and the Platypus simpleDocT= emplate implementation method.  This process works beautifully.  The only caveat I am experiencing is the output of Column Header info.  As it i= s, the platypus table method only inserts these column header values in the first = row of the table on the first page.  I am looking to have these Column Hea= der values display in the first row of all pages.  I am having some diffic= ulty with this as I am unsure how to know at which point the table information w= ill “flow” to the subsequent pages.  Does anyone have an idea how I might approac= h this requirement.  Any input is graciously received.  Thanks.&nbs= p; Rob    

=00 ----=_NextPart_ST_14_18_59_Friday_December_06_2002_31441-- From reportlab-users@reportlab.com Fri Dec 6 22:53:00 2002 From: reportlab-users@reportlab.com (William Dode) Date: 06 Dec 2002 23:53:00 +0100 Subject: [reportlab-users] Creating Column Headers for each page using Platypus Tables In-Reply-To: <38FC1F2515BFFD4E904B82A1C2A047B89BFA78@oak2kmail.stcg.net> References: <38FC1F2515BFFD4E904B82A1C2A047B89BFA78@oak2kmail.stcg.net> Message-ID: <877kemiwtv.fsf@flibuste.net> "Robert Krieg" writes: > Hello All, > > > > I am writing a python program using the reportLab modules that connects > to an SQL database, returns results from the users query, then outputs > results to a .pdf file using Platypus tables.py and the Platypus > simpleDocTemplate implementation method. This process works > beautifully. The only caveat I am experiencing is the output of Column > Header info. As it is, the platypus table method only inserts these > column header values in the first row of the table on the first page. I > am looking to have these Column Header values display in the first row > of all pages. I am having some difficulty with this as I am unsure how > to know at which point the table information will "flow" to the > subsequent pages. Does anyone have an idea how I might approach this > requirement. Any input is graciously received. Thanks. Rob > you must use the Table arg : repeatRows=1 -- William Dode - http://wikipython.tuxfamily.org From reportlab-users@reportlab.com Sat Dec 7 01:40:23 2002 From: reportlab-users@reportlab.com (Stuart Bishop) Date: Sat, 7 Dec 2002 12:40:23 +1100 Subject: [reportlab-users] Re: pyRXP vs ONIX DTD (and XHTML) In-Reply-To: Message-ID: On Thursday, December 5, 2002, at 09:32 PM, Andy Robinson wrote: >> It's been some time since I last read XML specs, so I could be very >> wrong, but I seem to remember that XML is basically inseparable from >> Unicode. > > There were 8-bit and 16-bit options when building pyRXP. > AFAIR it passed 100% of the unicode tet suite in 16 bit mode > and only passed the non-Unicode-related ones in 8 bit. > If someone wants to play around with 16 bit builds and > learn more about it, that's great. > > Personally I still believe that Python has its own Unicode > library which should do conversions explicitly. Most Python > apps are not yet using Unicode strings. But if someone can > suggest a compatibility route I would welcome it. In my original problem, the issue was not the XML code I am generating, but the DTD I was validating against. I can't see how Python's Unicode libraries would help in this situation - the RXP library is trying to verify that a sequence of 6 or 7 8-bit characters represents a valid 16-bit character, and this is failing. Solutions? - Build RXP with 16-bit support. This would involve the glue code returning Unicode strings. I think the only con would be memory consumption, and breaking some existing code that can't cope with getting a Unicode string instead of an 8-bit string? A few quick tests show that this is a bit more involved than simply changing CHAR_SIZE in setup.py. I guess the glue needs to be modified to return Unicode strings and use codecs.utf_16_decode at the relevant times. I swore off C years ago so am a bit slow here :-) - Hack RXP to work internally in UTF-8. When it hits an 'invalid 8-bit entity', have RXP expand it into the two-char UTF-8 representation. Solves the memory issue, but are there other side effects? No idea how easy this one is to implement. - Run RXP in 'ExpandCharacterEntities=0' mode, and have the glue validate and expand the character entities itself. Probably a performance nightmare. Whatever mode is chosen, pyRXP.Parser().parse() will need to return Unicode strings. We cannot leave expansion up to the application as it has no idea if this should be done for a particular block of data (we don't want to do entity expansions on data pulled from a CDATA section or risk corrupting them). This is a pretty major problem with the parser - according to http://www.w3.org/TR/REC-xml#charsets pyRXP is failing to do something it *must* be able to do. Also, same issue I was having with ONIX is also true of XHTML 1.0: XHTML=u''' ''' pyRXP.Parser().parse(XHTML) -- Stuart Bishop http://shangri-la.dropbear.id.au/ From reportlab-users@reportlab.com Sat Dec 7 10:45:39 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Sat, 7 Dec 2002 10:45:39 +0000 Subject: [reportlab-users] Re: pyRXP vs ONIX DTD (and XHTML) In-Reply-To: References: Message-ID: In article , Stuart Bishop writes ....... agreed I understood the problem was in the imported DTD > >Solutions? > - Build RXP with 16-bit support. This would involve > the glue code returning Unicode strings. I think the only > con would be memory consumption, and breaking some > existing code that can't cope with getting a Unicode string > instead of an 8-bit string? A few quick tests show that this > is a bit more involved than simply changing CHAR_SIZE > in setup.py. I guess the glue needs to be modified to return > Unicode strings and use codecs.utf_16_decode at > the relevant times. I swore off C years ago so am a bit > slow here :-) > I think this is the only real solution > - Hack RXP to work internally in UTF-8. When it hits an > 'invalid 8-bit entity', have RXP expand it into the two-char > UTF-8 representation. Solves the memory issue, but are > there other side effects? No idea how easy this one is to > implement. > the problem here is that I assume we have to know the document is supposed to be in UTF-8. I haven't looked internally at RXP to see if this is easily know to the parser. It seems odd to me that the DTD can be used in any document. Can a utf-8 doc define itself using a unicode DTD? I think this is the one that will appeal to Andy(in his pointy haired manager incarnation), but I would like to get some agreement on when this hack is allowed. > - Run RXP in 'ExpandCharacterEntities=0' mode, and have > the glue validate and expand the character entities itself. > Probably a performance nightmare. > this is what we have been doing, but we are passing the XML fragments around into other bits of XML. >Whatever mode is chosen, pyRXP.Parser().parse() will need >to return Unicode strings. I disagree here. If the parser is using UTF-8 then it may return that. You can argue that there should be an alternative return mechanism ie do the conversion to unicode, but that would also be only one statement away in modern Python. >We cannot leave expansion up to the >application as it has no idea if this should be done for a particular >block of data (we don't want to do entity expansions on data >pulled from a CDATA section or risk corrupting them). > >This is a pretty major problem with the parser - according to >http://www.w3.org/TR/REC-xml#charsets pyRXP is failing to do >something it *must* be able to do. Also, same issue I was having >with ONIX is also true of XHTML 1.0: > >XHTML=u''' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >''' >pyRXP.Parser().parse(XHTML) > > -- Robin Becker From reportlab-users@reportlab.com Sat Dec 7 14:54:20 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 07 Dec 2002 15:54:20 +0100 Subject: [reportlab-users] Zope-RenderPM 0.4 released Message-ID: <3DF20B9C.E722130@rasselstein-hoesch.de> Hi all, version 0.4 of the Zope Product RenderPM has been released today. DrawingObjects can now be cached and DrawingTemplates can contain Shapes and Labels. For more info and download see the following URL: http://www.zope.org/Members/Dirk.Datzert/RenderPM/ I'm also looking for a new cool product name since RenderPM is now more than a renderer for GIF/JPEG/PNG and it can be confused with the origin rl_addon _renderPM. Regards, Dirk From reportlab-users@reportlab.com Sat Dec 7 18:54:33 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 07 Dec 2002 19:54:33 +0100 Subject: [reportlab-users] spider.py Message-ID: <3DF243E9.424196A1@rasselstein-hoesch.de> Hi Andy, I detected a possible mini-bug in SpiderChart line 179: for angle in angles: sa = sin(angle)*radius ca = cos(angle)*radius spoke = Line(centerx, centery, centerx + ca, centery + sa, strokeWidth = 0.5) #print 'added spoke (%0.2f, %0.2f) -> (%0.2f, %0.2f)' % (spoke.x1, spok e.y1, spoke.x2, spoke.y2) spokes.append(spoke) - test = self.labels[i] + text = labels[i] if text: Regards, Dirk From reportlab-users@reportlab.com Sat Dec 7 18:58:38 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 07 Dec 2002 19:58:38 +0100 Subject: [reportlab-users] SpiderChart Message-ID: <3DF244DE.8EB8786B@rasselstein-hoesch.de> Hi, I would suggest that the labels-Property of SpiderChart should be better real Labels. Regards, Dirk From reportlab-users@reportlab.com Sat Dec 7 20:51:42 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 07 Dec 2002 21:51:42 +0100 Subject: [reportlab-users] BarChart barLabelCallout ? Message-ID: <3DF25F5E.F713D7B6@rasselstein-hoesch.de> Hi, I found a new attribute in BarChart: barLabelCallOut = AttrMapValue(None, desc='Callout function(label)\nlabel._callOutInfo = (self,g,rowNo,colNo,x,y,width,height,x00,y00,x0,y0)'), Can anybody explain ? Regards, Dirk From reportlab-users@reportlab.com Sun Dec 8 03:44:07 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Sun, 8 Dec 2002 03:44:07 -0000 Subject: [reportlab-users] BarChart barLabelCallout ? In-Reply-To: <3DF25F5E.F713D7B6@rasselstein-hoesch.de> Message-ID: > Hi, > > I found a new attribute in BarChart: > > barLabelCallOut = AttrMapValue(None, desc='Callout > function(label)\nlabel._callOutInfo > = > (self,g,rowNo,colNo,x,y,width,height,x00,y00,x0,y0)'), > > Can anybody explain ? > I think this was in response to Pat Johnson's enquiry that she wanted positive bars to be labelled e.g. '3.14' in black text, and negaive ones to be e.g. '(3.14)' in red text. Robin added a callback mechanism so you could write your own function which drew a label, and thereby permit radically different labels for positive and negative amounts. It is not beautiful, but it's hard to see a better way. - Andy From reportlab-users@reportlab.com Sun Dec 8 10:45:19 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Sun, 8 Dec 2002 10:45:19 +0000 Subject: [reportlab-users] BarChart barLabelCallout ? In-Reply-To: References: <3DF25F5E.F713D7B6@rasselstein-hoesch.de> Message-ID: In article , Andy Robinson writes >> Hi, >> >> I found a new attribute in BarChart: >> >> barLabelCallOut = AttrMapValue(None, desc='Callout >> function(label)\nlabel._callOutInfo >> = >> (self,g,rowNo,colNo,x,y,width,height,x00,y00,x0,y0)'), >> >> Can anybody explain ? >> > Actually I think this was used for another customer who needed customisation. The idea is to have a chartwide function that is passed the label just after it is created and added to the group, g. The label has all the above info set on it in the _callOutInfo attribute. I think we already handle plus/minus position changing, and the barchartlabel class knows how to change its anchors. Pat Johnson's problem was how to change the way labels are displayed when negative (ie red and absolute value in parentheses). Ideally we should use some kind of oo to be able to do this kind of thing. Properly thought out the class of the barlabels etc could be made into another attribute, but it's not obvious whether the drawing part of such a label belongs to the chart or the label itself. >I think this was in response to Pat Johnson's enquiry >that she wanted positive bars to be labelled e.g. '3.14' >in black text, and negaive ones to be e.g. '(3.14)' in >red text. Robin added a callback mechanism so you could >write your own function which drew a label, and thereby >permit radically different labels for positive and negative >amounts. It is not beautiful, but it's hard to see a better >way. > >- Andy -- Robin Becker From reportlab-users@reportlab.com Sun Dec 8 19:22:30 2002 From: reportlab-users@reportlab.com (Doug) Date: Sun, 8 Dec 2002 14:22:30 -0500 Subject: [reportlab-users] RE: Pythonpoint and &#x; In-Reply-To: Message-ID: I just noticed that on Python versions >= 2.1 chr(150) returns '\x96' instead of the ascii character. This same behavior will als o occur for other characters between 0 and 255. I am not sure yet of the best way to address this change in python but I thought I should at least let you know that in Pythonpoint: Part 1 – Feature Overview the result is 'x96 Feature Overview' From reportlab-users@reportlab.com Mon Dec 9 01:51:46 2002 From: reportlab-users@reportlab.com (Stuart Bishop) Date: Mon, 9 Dec 2002 12:51:46 +1100 Subject: [reportlab-users] Re: pyRXP vs ONIX DTD (and XHTML) In-Reply-To: Message-ID: On Saturday, December 7, 2002, at 09:45 PM, Robin Becker wrote: > the problem here is that I assume we have to know the document is > supposed to be in UTF-8. I haven't looked internally at RXP to see if > this is easily know to the parser. It seems odd to me that the DTD can > be used in any document. Can a utf-8 doc define itself using a unicode > DTD? I think this is the one that will appeal to Andy(in his pointy > haired manager incarnation), but I would like to get some agreement on > when this hack is allowed. From http://www.w3.org/TR/REC-xml#charencoding, it seems that the document and all external documents can each use a different encoding, and is assumed to be UTF-8 or UTF-16 unless otherwise stated (its the parsers job to detect UTF-8 or UTF-16). So you can declare a XHTML 1.0 document using us-ascii encoding. I assume this also means a validation warning would be raised if you put an œ in this us-ascii document (?). The internal UTF-8 idea may work, but would involve first translating the input document & external files into UTF-8, with all &# encodings expanded (eoCB could do this...). And if this is done, the rest of the system would remain unmodified and return the parsed document as UTF-8 strings (either returned as Python Unicode strings by the glue, or left up to the application to call codecs.utf_8_decode on them if they think they need to handle extended characters). The trick would be not expanding any &# sequences that happens to be inside a CDATA section. Here is a proof of concept of pyRXP running internally in UTF-8 mode, done by abusing the eoCB callback. It needs a test suite to ensure that there isn't some flaw in my reasoning :-). Memory consumption should be the same. The pre-RXP munging may slow things down enough to make it quicker to just run RXP in 16 bit mode though - I guess this depends on the size of your source file. import pyRXP import urllib,urlparse import sys,os,tempfile,re,traceback from pprint import pprint XHTML=u'''

Œ & \u0152 are not ASCII

''' class _TempFile: _files = [] def new(self,prefix=''): name = tempfile.mktemp('%s-utf8' % prefix) self._files.append(name) return name def __del__(self): for f in self._files: try: os.unlink(f) except: pass tempmaker = _TempFile() # BUG: This re won't work if the source document is encoded as UTF-16 # or other encodings that are not ASCII supersets, in case anyone # is actually silly enough to do this. These encodings will need to # be detected using magic as per XML 1.0 spec. enc_re = re.compile("\s*<\?xml[^>]+encoding='([^']+)'[^>]*\?>") ext_re = re.compile("&#(x?[\da-zA-Z]+?);") # BUG: Handling of DTD stored relative to cwd untested base_url = 'file://' + '/'.join(os.path.split(os.getcwd())) # BUG: Abusing eoCB to munge external documents causes validation error # messages to report stupid file names def eoCB(url): # Munge the external thingy and cache the munged version # try: # handle relative URL's split = urlparse.urlsplit(url) global base_url if not split[0]: url = urlparse.urljoin(base_url,url) else: base_url = url # First suck in the data and convert it to a Python Unicode string data = urllib.urlopen(url).read() match = enc_re.match(data) if match: encoding = match.group(1) else: encoding = 'UTF-8' data = data.decode(encoding) # Now a Unicode string # Now expand encoded characters as per XML spec # BUG: encoded characters in CDATA sections and possibly elsewhere # should not be expanded def extrepl(match): m = match.group(1) if m[0] == 'x': m = int(m[1:],16) else: m = int(m) # BUG: doesn't detect invalid entities. # Need to ensure Char ::= #x9 | #xA | #xD | # [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] if m >= 128: return unichr(m) else: # Pass through encoded ASCII characters, as these may be # required to be encoded due to XML restrictions (eg. quote # character) return '&#%s;' % match.group(1) data = ext_re.sub(extrepl,data) t = tempmaker.new(url.split('/')[-1]) f = open(t,'w') f.write(data.encode('UTF-8')) f.close() return t except: print 'Exception in eoCB:' traceback.print_exc(file=sys.stdout) # BUG: Source document needs to be converted from its native charset to UTF-8, # and &#xxxx; entity expansion done. parser = pyRXP.Parser(eoCB=eoCB,XMLPredefinedEntities=0) result = parser.parse(XHTML.encode('utf-8')) pprint(result) # Strings in result can be decoded using foo.decode('utf-8') >> - Run RXP in 'ExpandCharacterEntities=0' mode, and have >> the glue validate and expand the character entities itself. >> Probably a performance nightmare. >> > this is what we have been doing, but we are passing the XML fragments > around into other bits of XML. I can do this too for my application - I was hoping to catch the case of someone including a dodgy entity like '�', '￾' or 'ࠀ', but I doubt this will actually matter in the real world :-) -- Stuart Bishop http://shangri-la.dropbear.id.au/ From reportlab-users@reportlab.com Mon Dec 9 08:13:39 2002 From: reportlab-users@reportlab.com (Marius Gedminas) Date: Mon, 9 Dec 2002 10:13:39 +0200 Subject: [reportlab-users] pyRXP vs ONIX DTD In-Reply-To: <9irOvWApoG89EwIY@jessikat.fsnet.co.uk> References: <7F7B96AB-0800-11D7-B573-000393B63DDC@shangri-la.dropbear.id.au> <$1N+KLAvtx79EwgN@jessikat.fsnet.co.uk> <20021205095951.GA26876@codeworks.lt> <027MqKA3my79Eww0@jessikat.demon.co.uk> <20021205121722.GA27836@codeworks.lt> <20021206080823.GA612@codeworks.lt> <9irOvWApoG89EwIY@jessikat.fsnet.co.uk> Message-ID: <20021209081338.GA26915@codeworks.lt> On Fri, Dec 06, 2002 at 09:13:13AM +0000, Robin Becker wrote: > In article <20021206080823.GA612@codeworks.lt>, Marius Gedminas writes > ...... > >> > >> Are you saying there's a unique utf-8 version of these 16bit things? > > > >UTF-8 can technically express codes from 0 to 2^31 - 1, although > >currently both Unicode and ISO 10646 limit their codespaces to > >0..0x10fff > > > yes I knew that in theory, but thought there were some ambiguity problems in conversion back and > forth. I saw another table y'day saying that shortest aren't required. I seem to remember that this was so in earlier versions of Unicode, but later versions ammended the requirement to "Thou Shalt Not Accept Overlong UTF-8 Sequences". > http://www.unicode.org/versions/corrigendum1.html Hey, that's that the page above says: "Unicode Technical Committee has modified the definition of UTF-8 to forbid conformant implementations from interpreting non-shortest forms". > Anyhow I guess the question arises as to whether there's a convenient description of an > acceptable algorithm that maps the decimal > > 0 <= dddddd <= 2^31-1 Yes. > I assume we need two flavours, one for a bigendian and one for a little endian, but again > perhaps I'm overlooking something obvious. The nice table from the above > > Scalar Value UTF-16 1st Byte 2nd Byte 3rd Byte 4th Byte > 00000000 0xxxxxxx 00000000 0xxxxxxx 0xxxxxxx > > 00000yyy yyxxxxxx 00000yyy yyxxxxxx 110yyyyy 10xxxxxx > > zzzzyyyy yyxxxxxx zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx > > 000uuuuu zzzzyyyy 110110ww wwzzzzyy 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx > yyxxxxxx 110111yy yyxxxxxx > > > > > * Where uuuuu = wwww + 1 (to account for addition of 1000016 as in Section 3.7, Surrogates). > > > seems only to go to 2^16-1, (I assume you meant 2^21) > but am I always to assume the bigendian ordering for the Scalar > Value? Just treat the scalar value as a 32-bit integer (endianness is irrelevant when you do not want to express it as a sequence of bytes). Then, e.g. 0000000000000000zzzzyyyyyyxxxxxx maps to 1110zzzz 10yyyyyy 10xxxxxx in UTF-8 and to zzzzyyyyyxxxxxx in UTF-16 (which is zzzzyyyy yyxxxxxx in UTF-16BE and yyxxxxxx zzzzyyyy in UTF-16LE, when you serialize it). Marius Gedminas -- If vegetarians eat vegetables, what do humanitarians eat? From reportlab-users@reportlab.com Mon Dec 9 09:15:09 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Mon, 9 Dec 2002 09:15:09 +0000 Subject: [reportlab-users] Re: pyRXP vs ONIX DTD (and XHTML) In-Reply-To: References: Message-ID: In article , Stuart Bishop writes ..... my you have been busy. We only used the eoCB callback for DTD finding. I think there are two possibilities for the relative URL. The first and most obvious is relative to the document (ie similar to HTML) the second is relative to the application (a third might be the cwd). Whilst the cwd is normally the same as the appdir, it doesn't have to be given the sort of thing you're doing with eoCB (ie if we we're to jump about looking for stuff). I guess we should explore whether we can do what's needed with a minimal addition to the C code. I will try and find out where to insert a converter for the utf-8 case. -- Robin Becker From reportlab-users@reportlab.com Mon Dec 9 10:17:31 2002 From: reportlab-users@reportlab.com (Marius Gedminas) Date: Mon, 9 Dec 2002 12:17:31 +0200 Subject: [reportlab-users] Re: pyRXP vs ONIX DTD (and XHTML) In-Reply-To: References: Message-ID: <20021209101731.GB26915@codeworks.lt> On Mon, Dec 09, 2002 at 12:51:46PM +1100, Stuart Bishop wrote: > On Saturday, December 7, 2002, at 09:45 PM, Robin Becker wrote: > > >the problem here is that I assume we have to know the document is > >supposed to be in UTF-8. I haven't looked internally at RXP to see if > >this is easily know to the parser. It seems odd to me that the DTD can > >be used in any document. Can a utf-8 doc define itself using a unicode > >DTD? I think this is the one that will appeal to Andy(in his pointy > >haired manager incarnation), but I would like to get some agreement on > >when this hack is allowed. > > From http://www.w3.org/TR/REC-xml#charencoding, it seems that the > document and all external documents can each use a different > encoding, and is assumed to be UTF-8 or UTF-16 unless otherwise > stated (its the parsers job to detect UTF-8 or UTF-16). So you can > declare > a XHTML 1.0 document using us-ascii encoding. I assume this also means > a validation warning would be raised if you put an œ in this > us-ascii > document (?). I think not. validator.w3c.org accepts the following as valid XHTML: Foo

œ

The way I understand XML spec, you can have a document composed from a number of files ("external entities"), and each file can come in a different charset (and that's not mentioning character references, which are always specified as Unicode code points). The easiest way to combine all that into a single document is to convert everyting into some encoding of Unicode. Marius Gedminas -- 1 4m 5o 3l337! just got r00t on this k3wl site j00 sux0r5! From reportlab-users@reportlab.com Mon Dec 9 12:04:04 2002 From: reportlab-users@reportlab.com (Bajusz Tamas) Date: Mon, 09 Dec 2002 13:04:04 +0100 Subject: [reportlab-users] can platypus be canvas neutral? Message-ID: <3DF486B4.1050303@freemail.hu> Hi! If i understand correctly, platypus is tied to pdf now. Is there any chance to abstract the canvas and doc classes, to let people use platypus with other page oriented output (ps, gdi) ? Bajusz Tamás From reportlab-users@reportlab.com Mon Dec 9 13:59:34 2002 From: reportlab-users@reportlab.com (Remy C. Cool) Date: Mon, 9 Dec 2002 14:59:34 +0100 Subject: [reportlab-users] Preformatted problem with split and join error Message-ID: <200212091459.34910.dev-pdf@smartology.nl> Still busy with a reportlab test project, I stumbled into the following problems. 1) preformatted text ie:
this is preformatted text ... t h i s  i s  f a t
is 'made' into a Preformatted text flowable with: flowable = Preformatted('
this is preformatted text ... t h i s  
i s  f a t
', self.styleN, bulletText=None, dedent=0)) When I want to check if this text will fit into the frame (object), I use: flowables = self.document.object.split(flowable, self.canvas) The result is a list with 2 flowables ... one with the text and one empty with just a newline character. This happens even if the flowable fits nicely into the frame. No problems with Paragraph or XPreformatted flowables. 2) When I insert a print statement right after the split function above, to printout the returned flowables and use the AddFromList function later on to add the flowable to the frame ... I get an error: File "/usr/lib/python2.1/site-packages/reportlab/platypus/flowables.py", line 222, in __repr__ text = join(self.lines, "\n") NameError: global name 'join' is not defined Examining this file I found: class Preformatted(Flowable): """This is like the HTML
 tag.
    It attempts to display text exactly as you typed it in a fixed
    width "typewriter" font.
    The line breaks are exactly where you put
    them, and it will not be wrapped."""
    def __init__(self, text, style, bulletText = None, dedent=0):
        """text is the text to display. If dedent is set then common
            leading space
            will be chopped off the front (for example if the entire
            text is indented
            6 spaces or more then each line will have 6 spaces removed
            from the front).
        """
        self.style = style
        self.bulletText = bulletText
        self.lines = _dedenter(text,dedent)

    def __repr__(self):
        bT = self.bulletText
        H = "Preformatted("
        if bT is not None:
            H = "Preformatted(bulletText=%s," % repr(bT)
        import string
        text = join(self.lines, "\n")
        return "%s'''\\ \n%s''')" % (H, text)

Join could never work since it's not imported. It works when  I change 
the line from:
 text = join(self.lines, "\n")  
to:
 text = string.join(self.lines, "\n")

Regards,
Remy
 


From reportlab-users@reportlab.com  Mon Dec  9 14:10:52 2002
From: reportlab-users@reportlab.com (Gisbert Amm)
Date: Mon, 9 Dec 2002 15:10:52 +0100
Subject: [reportlab-users] Preformatted problem with split and join er
 ror
Message-ID: <74ADFA8C453ED611A71E00508BBBA135D9E587@exchange1.cinetic.de>

> -----Original Message-----
> From: Remy C. Cool [mailto:dev-pdf@smartology.nl]
> Sent: Monday, December 09, 2002 3:00 PM
> To: reportlab-users@reportlab.com
> Join could never work since it's not imported. It works when  
> I change 
> the line from:
>  text = join(self.lines, "\n")  
> to:
>  text = string.join(self.lines, "\n")

Since Python 2.0 you can do this easier without explicitly importing the
string module using the join method of the string object:

text = '\n'.join(self.lines)

I suspect that was intended.

Regards
Gisbert Amm
http://web.de/

From reportlab-users@reportlab.com  Mon Dec  9 14:17:45 2002
From: reportlab-users@reportlab.com (Jerome Alet)
Date: Mon, 9 Dec 2002 15:17:45 +0100
Subject: [reportlab-users] Preformatted problem with split and join er ror
In-Reply-To: <74ADFA8C453ED611A71E00508BBBA135D9E587@exchange1.cinetic.de>
References: <74ADFA8C453ED611A71E00508BBBA135D9E587@exchange1.cinetic.de>
Message-ID: <20021209141745.GA8560@mail.librelogiciel.com>

On Mon, Dec 09, 2002 at 03:10:52PM +0100, Gisbert Amm wrote:
> 
> Since Python 2.0 you can do this easier without explicitly importing the
> string module using the join method of the string object:
> 
> text = '\n'.join(self.lines)
> 
> I suspect that was intended.

No, because it breaks 1.5 compatibility.

what is missing is :

        from string import join
        
or the string.join() in the previous message.        

bye,

Jerome Alet

From reportlab-users@reportlab.com  Mon Dec  9 14:25:46 2002
From: reportlab-users@reportlab.com (Remy C. Cool)
Date: Mon, 9 Dec 2002 15:25:46 +0100
Subject: [reportlab-users] Preformatted problem with split and join error
In-Reply-To: <200212091459.34910.dev-pdf@smartology.nl>
References: <200212091459.34910.dev-pdf@smartology.nl>
Message-ID: <200212091525.46423.dev-pdf@smartology.nl>

On Monday 09 December 2002 14:59, Remy C. Cool wrote:

> flowable = Preformatted('this is preformatted text ... t h
> i s i s  f a t', self.styleN, bulletText=None, dedent=0))
>
> When I want to check if this text will fit into the frame (object),
> I use:
>
> flowables = self.document.object.split(flowable, self.canvas)
>
> The result is a list with 2 flowables ... one with the text and one
> empty with just a newline character. This happens even if the
> flowable fits nicely into the frame. No problems with Paragraph or
> XPreformatted flowables.

When I change the code in platypus flowables preformatted 
flowables.split

def split(self, availWidth, availHeight):
        #returns two Preformatted objects

        #not sure why they can be called with a negative height
        if availHeight < self.style.leading:
            return []

        linesThatFit = int(availHeight * 1.0 / self.style.leading)

        text1 = string.join(self.lines[0:linesThatFit], '\n')
        text2 = string.join(self.lines[linesThatFit:], '\n')
        style = self.style
        if style.firstLineIndent != 0:
            style = deepcopy(style)
            style.firstLineIndent = 0

	# edited to return only one value if text2 is empty
        if text2:
	    return [Preformatted(text1, self.style), Preformatted(text2, 
style)]
	else:
	    return [Preformatted(text1, self.style)]

After this 'crude hack' (if you can call it a hack :)  my program 
works and does not create an empty preformatted flowable after the 
split function. I don't know what further impact this has on the 
preformatted flowable because  I presume that returning two 
preformatted objects has a purpose. (?)

Regards,
Remy  

From reportlab-users@reportlab.com  Mon Dec  9 18:52:37 2002
From: reportlab-users@reportlab.com (Robin Becker)
Date: Mon, 9 Dec 2002 18:52:37 +0000
Subject: [reportlab-users] Preformatted problem with split and join error
In-Reply-To: <200212091525.46423.dev-pdf@smartology.nl>
References: <200212091459.34910.dev-pdf@smartology.nl>
 <200212091525.46423.dev-pdf@smartology.nl>
Message-ID: 

In order to figure out exactly what's going on I'd need to have an
example and the font info used to figure out exactly why this is
happening. Is it possible you have some empty lines on the end?
-- 
Robin Becker

From reportlab-users@reportlab.com  Mon Dec  9 21:33:35 2002
From: reportlab-users@reportlab.com (Jerome Alet)
Date: Mon, 9 Dec 2002 22:33:35 +0100
Subject: [reportlab-users] problem with a TrueType font
Message-ID: <20021209213335.GA12387@mail.librelogiciel.com>

Hi,

I've got a problem with an additionnal truetype font.

using platypus  tag there's no problem, however
my page templates defines a beforeDrawPage() method
which gets executed and which should write
something in this font directly on the canvas
(big page title, FYI)

This gets written but is invisible (I see a black
selection box in Acrobat Reader when I try to select
the text, but no text is visible, even in reverse video)

setStrokeColorRGB and setFillColorRGB are
both called with black color, result is the same
with another color.

If I use the very same font in my platypus story's
paragraphs, then there's no problem.

Any idea ?

RL is CVS version, Python is 2.2

Thanks in advance

Jerome Alet

From reportlab-users@reportlab.com  Tue Dec 10 07:16:29 2002
From: reportlab-users@reportlab.com (Remy C. Cool)
Date: Tue, 10 Dec 2002 08:16:29 +0100
Subject: [reportlab-users] Preformatted problem with split and join error
In-Reply-To: 
References: <200212091459.34910.dev-pdf@smartology.nl> <200212091525.46423.dev-pdf@smartology.nl> 
Message-ID: <200212100816.29604.dev-pdf@smartology.nl>

On Monday 09 December 2002 19:52, Robin Becker wrote:
> In order to figure out exactly what's going on I'd need to have an
> example and the font info used to figure out exactly why this is
> happening. Is it possible you have some empty lines on the end?

This is the line in the xml file that get's parsed: 

show this as is ... e x a c t l y
Everything between the pre tags is stored in a variable (temp_storage) and fed to the Preformatted flowable class. I use the Normal style of whom the font is Times-Roman I think. Since only the data between the pre tags is stored, there are no newlines or empty lines present (checked that first). styles = getSampleStyleSheet() self.styleN = styles['Normal'] self.flowables.append(Preformatted(temp_storage, self.styleN, bulletText=None, dedent=0)) I'm going to rewrite/reorder some of my code and will do some more tests with the preformatted class. Remy Cool From reportlab-users@reportlab.com Tue Dec 10 14:26:44 2002 From: reportlab-users@reportlab.com (Juergen R. Plasser) Date: Tue, 10 Dec 2002 15:26:44 +0100 Subject: [reportlab-users] Zope-RenderPM 0.4 released In-Reply-To: <3DF20B9C.E722130@rasselstein-hoesch.de> References: <3DF20B9C.E722130@rasselstein-hoesch.de> Message-ID: <22253258.1039534004@[192.168.123.98]> FYI: I had to compile reportlab from CVS to get Zope-RenderPM 0.4 running.=20 The latest stable version (1.16) of reportlab did not fit. Juergen --On Samstag, 07. Dezember 2002 15:54 +0100 Dirk Datzert=20 wrote: > Hi all, > > version 0.4 of the Zope Product RenderPM has been released today. > > DrawingObjects can now be cached and DrawingTemplates can contain > Shapes and Labels. For more info and download see the following URL: > > http://www.zope.org/Members/Dirk.Datzert/RenderPM/ > > I'm also looking for a new cool product name since RenderPM is now > more than a renderer for GIF/JPEG/PNG and it can be confused with > the origin rl_addon _renderPM. > > Regards, > Dirk > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users --=20 __ DI J=FCrgen R. Plasser * *** ***** ****** ********* = plasser@hexagon.at / \ HEXAGON EDV-Dienstleistungen | A-4221 Steyregg | Weissenwolffstra=DFe = 14 \__/ www.hexagon.at | info@hexagon.at | Internet | ASP | Security | = Software Computer science is no more about Computers, than astronomy is about telescopes. (Dijkstra) From reportlab-users@reportlab.com Tue Dec 10 14:41:34 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Tue, 10 Dec 2002 15:41:34 +0100 Subject: [reportlab-users] Zope-RenderPM 0.4 released References: <3DF20B9C.E722130@rasselstein-hoesch.de> <22253258.1039534004@[192.168.123.98]> Message-ID: <000501c2a05a$3cde5620$3e28011c@rag2> Hi J=FCrgen, you are right: I would suggest all users to use latest version of = reportlab out of CVS. Regards, Dirk ----- Original Message -----=20 From: "Juergen R. Plasser" To: Sent: Tuesday, December 10, 2002 3:26 PM Subject: Re: [reportlab-users] Zope-RenderPM 0.4 released FYI: I had to compile reportlab from CVS to get Zope-RenderPM 0.4 = running.=20 The latest stable version (1.16) of reportlab did not fit. Juergen --On Samstag, 07. Dezember 2002 15:54 +0100 Dirk Datzert=20 wrote: > Hi all, > > version 0.4 of the Zope Product RenderPM has been released today. > > DrawingObjects can now be cached and DrawingTemplates can contain > Shapes and Labels. For more info and download see the following URL: > > http://www.zope.org/Members/Dirk.Datzert/RenderPM/ > > I'm also looking for a new cool product name since RenderPM is now > more than a renderer for GIF/JPEG/PNG and it can be confused with > the origin rl_addon _renderPM. > > Regards, > Dirk > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users --=20 __ DI J=FCrgen R. Plasser * *** ***** ****** ********* = plasser@hexagon.at / \ HEXAGON EDV-Dienstleistungen | A-4221 Steyregg | = Weissenwolffstra=DFe 14 \__/ www.hexagon.at | info@hexagon.at | Internet | ASP | Security | = Software Computer science is no more about Computers, than astronomy is about telescopes. (Dijkstra) _______________________________________________ reportlab-users mailing list reportlab-users@reportlab.com http://two.pairlist.net/mailman/listinfo/reportlab-users From reportlab-users@reportlab.com Tue Dec 10 14:58:39 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Tue, 10 Dec 2002 14:58:39 -0000 Subject: [reportlab-users] Zope-RenderPM 0.4 released In-Reply-To: <000501c2a05a$3cde5620$3e28011c@rag2> Message-ID: > Hi Jürgen, > > you are right: I would suggest all users to use latest version of > reportlab out of CVS. > > Regards, > Dirk Dirk, is this because you have made changes which depend on later features, or did we break something in 1.16? I expect we will do one more release before Christmas. We should synchronize on this so that Zope-renderPM is tested with it too just before it goes out. Thanks,. Andy From reportlab-users@reportlab.com Tue Dec 10 15:23:49 2002 From: reportlab-users@reportlab.com (Jerome Alet) Date: Tue, 10 Dec 2002 16:23:49 +0100 Subject: [reportlab-users] problem with a TrueType font In-Reply-To: <20021209213335.GA12387@mail.librelogiciel.com> References: <20021209213335.GA12387@mail.librelogiciel.com> Message-ID: <20021210152349.GA19822@mail.librelogiciel.com> Hi, On Mon, Dec 09, 2002 at 10:33:35PM +0100, Jerome Alet wrote: > > I've got a problem with an additionnal truetype font. > > using platypus tag there's no problem, however > my page templates defines a beforeDrawPage() method > which gets executed and which should write > something in this font directly on the canvas > (big page title, FYI) > > This gets written but is invisible (I see a black > selection box in Acrobat Reader when I try to select > the text, but no text is visible, even in reverse video) Sorry for this *very strange* problem... Nothing to do with fonts at all. Next time I'll check my clipping more carefully ;-) Interestingly, while the string doesn't appear on the page because of my wrong clipping, the area is still selectable in Acrobat Reader. bye, and sorry again Jerome Alet From reportlab-users@reportlab.com Wed Dec 11 09:56:43 2002 From: reportlab-users@reportlab.com (knmurthy) Date: Wed, 11 Dec 2002 15:26:43 +0530 Subject: [reportlab-users] logo(image) in every page header Message-ID: can any one help me how do i genrate pdf file with logo(image) on every pdf page header. and after that some Text.. thanks, murthy From reportlab-users@reportlab.com Wed Dec 11 11:05:17 2002 From: reportlab-users@reportlab.com (Jerome Alet) Date: Wed, 11 Dec 2002 12:05:17 +0100 Subject: [reportlab-users] logo(image) in every page header In-Reply-To: References: Message-ID: <20021211110517.GB28244@mail.librelogiciel.com> On Wed, Dec 11, 2002 at 03:26:43PM +0530, knmurthy wrote: > can any one help me how do i genrate pdf file with logo(image) on every pdf > page header. > and after that some Text.. Nothing to do with Zope, but anyway you can see an example in reportlab/demos/rlzope/rlzope.py you may just draw your image in the beforeDrawPage or afterDrawPage methods in your pagetemplate, then it will appear on each page. hth Jerome Alet From reportlab-users@reportlab.com Wed Dec 11 11:37:18 2002 From: reportlab-users@reportlab.com (knmurthy) Date: Wed, 11 Dec 2002 17:07:18 +0530 Subject: [reportlab-users] logo(image) in every page header In-Reply-To: <20021211110517.GB28244@mail.librelogiciel.com> Message-ID: hi Jerome, i have untared reportlabs.tar file in to zope/lib/python/Shared. according to your readme.txt my question is where i have to set the path & what is the varible name?? 1 - Install reportlab in the Zope/lib/python/Shared directory by unpacking the tarball and putting a reportlabs.pth file in site-packages for the Zope used with Python. The path value in the reportlabs.pth file must be relative. For a typical Zope installation, the path is "../../python/Shared". Remember to restart Zope so the new path is instantiated. thanks, murthy -----Original Message----- From: reportlab-users-admin@reportlab.com [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Jerome Alet Sent: Wednesday, December 11, 2002 4:35 PM To: reportlab-users@reportlab.com Subject: Re: [reportlab-users] logo(image) in every page header On Wed, Dec 11, 2002 at 03:26:43PM +0530, knmurthy wrote: > can any one help me how do i genrate pdf file with logo(image) on every pdf > page header. > and after that some Text.. Nothing to do with Zope, but anyway you can see an example in reportlab/demos/rlzope/rlzope.py you may just draw your image in the beforeDrawPage or afterDrawPage methods in your pagetemplate, then it will appear on each page. hth Jerome Alet _______________________________________________ reportlab-users mailing list reportlab-users@reportlab.com http://two.pairlist.net/mailman/listinfo/reportlab-users From reportlab-users@reportlab.com Wed Dec 11 11:53:23 2002 From: reportlab-users@reportlab.com (Jerome Alet) Date: Wed, 11 Dec 2002 12:53:23 +0100 Subject: [reportlab-users] logo(image) in every page header In-Reply-To: References: <20021211110517.GB28244@mail.librelogiciel.com> Message-ID: <20021211115323.GA29116@mail.librelogiciel.com> On Wed, Dec 11, 2002 at 05:07:18PM +0530, knmurthy wrote: > > i have untared reportlabs.tar file in to zope/lib/python/Shared. > according to your readme.txt Sorry, this is only if you plan to use ReportLab with Zope. I meant you can give a look at rlzope's code even if you don't use Zope, of course it won't run but the code to use outside of Zope is almost 100% identical (just get images from the filesystem instead of from Zope) > my question is where i have to set the path & what is the varible name?? I don't understand your question. bye, Jerome Alet From reportlab-users@reportlab.com Wed Dec 11 12:07:28 2002 From: reportlab-users@reportlab.com (knmurthy) Date: Wed, 11 Dec 2002 17:37:28 +0530 Subject: [reportlab-users] logo(image) in every page header In-Reply-To: <20021211115323.GA29116@mail.librelogiciel.com> Message-ID: Hello Jerome Alet, yes i am using ReportLab with Zope only can you explain detaly below poient 1 - Install reportlab in the Zope/lib/python/Shared directory by unpacking the tarball and putting a reportlabs.pth file in site-packages for the Zope used with Python. The path value in the reportlabs.pth file must be relative. For a typical Zope installation, the path is "../../python/Shared". Remember to restart Zope so the new path is instantiated. thanks, Murthy -----Original Message----- From: reportlab-users-admin@reportlab.com [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Jerome Alet Sent: Wednesday, December 11, 2002 5:23 PM To: reportlab-users@reportlab.com Subject: Re: [reportlab-users] logo(image) in every page header On Wed, Dec 11, 2002 at 05:07:18PM +0530, knmurthy wrote: > > i have untared reportlabs.tar file in to zope/lib/python/Shared. > according to your readme.txt Sorry, this is only if you plan to use ReportLab with Zope. I meant you can give a look at rlzope's code even if you don't use Zope, of course it won't run but the code to use outside of Zope is almost 100% identical (just get images from the filesystem instead of from Zope) > my question is where i have to set the path & what is the varible name?? I don't understand your question. bye, Jerome Alet _______________________________________________ reportlab-users mailing list reportlab-users@reportlab.com http://two.pairlist.net/mailman/listinfo/reportlab-users From reportlab-users@reportlab.com Wed Dec 11 12:15:14 2002 From: reportlab-users@reportlab.com (Jerome Alet) Date: Wed, 11 Dec 2002 13:15:14 +0100 Subject: [reportlab-users] logo(image) in every page header In-Reply-To: References: <20021211115323.GA29116@mail.librelogiciel.com> Message-ID: <20021211121514.GD29116@mail.librelogiciel.com> On Wed, Dec 11, 2002 at 05:37:28PM +0530, knmurthy wrote: > yes i am using ReportLab with Zope only OK. > can you explain detaly below poient > > 1 - Install reportlab in the Zope/lib/python/Shared directory by unpacking > the tarball and putting a reportlabs.pth file in site-packages for the > Zope > used with Python. The path value in the reportlabs.pth file must be > relative. For a typical Zope installation, the path is > "../../python/Shared". > Remember to restart Zope so the new path is instantiated. This has to be done only if you use a precompiled Zope+Python binary. If you use, like me, independant Zope and Python packages (Debian here), then just simply install reportlab in /usr/lib/python2.1/site-packages/reportlab and it's OK. (under Debian : apt-get install python zope python-reportlab) If you use a precompiled Zope+Python package (e.g. under Windows), then I suppose that the above procedure is exact, but I've never tried it, and so I can't explain more than what is already written. This installation procedure was contributed by Robin, IIRC. sorry but I can't help more. Jerome Alet From reportlab-users@reportlab.com Wed Dec 11 12:22:09 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Wed, 11 Dec 2002 13:22:09 +0100 Subject: [reportlab-users] FYI: QuickTime/MPEG-4 coming to mobile phones Message-ID: <2B302A6A-0D03-11D7-9B4E-00039345C610@darwin.in-berlin.de> http://story.news.yahoo.com/news?tmpl=story2&cid=77&ncid=738&e=8&u=/mc/ 20021211/tc_mc/docomo_unveils_mpeg_4_phones__new_quicktime_coming Remember my experiments creating QuickTime with ReportLab? "Dynamically created content for 3G phones..." Dinu -- Dinu C. Gherman ...................................................................... "The empires of the future are the empires of the mind." (Winston Churchill) From reportlab-users@reportlab.com Wed Dec 11 16:27:22 2002 From: reportlab-users@reportlab.com (Remy C. Cool) Date: Wed, 11 Dec 2002 17:27:22 +0100 Subject: [reportlab-users] set default unit possible ? Message-ID: <200212111727.22169.dev-pdf@smartology.nl> Is it possible to set a default unit with a stylesheet ? It's a bit of a hassle to append * mm/cm/inch to every value that needs a unit in parsing an xml file with paragraphs. Regards, Remy Cool From reportlab-users@reportlab.com Wed Dec 11 16:50:39 2002 From: reportlab-users@reportlab.com (Martin =?iso-8859-1?Q?Sk=F8tt?=) Date: Wed, 11 Dec 2002 17:50:39 +0100 Subject: [reportlab-users] Problem importing file using PageCatcher Message-ID: <20021211165039.GB2704@martin> Sorry for posting questions on PageCatcher here if its not the appropiate place, but it was the only one I could find. I'm trying to load an existing pdf file into a data file using the storeForms procedure like this: d = pageCatcher.storeForms("s2papir.pdf", "foo.data", prefix="fourpage", all=1, verbose=1) But I get this error: password is '' placing pages [0] from s2papir.pdf into foo.data Traceback (most recent call last): File "", line 1, in ? File "pageCatcher.py", line 1387, in storeForms File "pageCatcher.py", line 610, in parse File "pageCatcher.py", line 752, in parse_xref_entries File "/usr/lib/python2.1/string.py", line 214, in atoi return _int(s, base) ValueError: invalid literal for int(): f Can anyone explain to me what might be wrong with the document? I suspect that it might be that a font (helvetica-light) isn't embedded into the document. My reason for suspecting this is that I have another file from the same person, but with the font embedded and it loads just fine. -- Martin Skøtt Xenux ApS - The Linux People martin@xenux.dk From reportlab-users@reportlab.com Wed Dec 11 20:29:18 2002 From: reportlab-users@reportlab.com (Aaron Watters) Date: Wed, 11 Dec 2002 15:29:18 -0500 Subject: [reportlab-users] Problem importing file using PageCatcher References: <20021211165039.GB2704@martin> Message-ID: <3DF7A01E.1000008@reportlab.com> Please forward the s2papir.pdf file to me personally (not the user list) if you can. This may be a PageCatcher bug. -- Aaron Watters Martin Skøtt wrote: >Sorry for posting questions on PageCatcher here if its not the appropiate >place, but it was the only one I could find. > >I'm trying to load an existing pdf file into a data file using the storeForms >procedure like this: >d = pageCatcher.storeForms("s2papir.pdf", "foo.data", prefix="fourpage", >all=1, verbose=1) > >But I get this error: >password is '' > > > placing pages [0] from s2papir.pdf into foo.data > Traceback (most recent call last): > File "", line 1, in ? > File "pageCatcher.py", line 1387, in storeForms > File "pageCatcher.py", line 610, in parse > File "pageCatcher.py", line 752, in parse_xref_entries > File "/usr/lib/python2.1/string.py", line 214, in atoi > return _int(s, base) > ValueError: invalid literal for int(): f > >Can anyone explain to me what might be wrong with the document? I suspect that >it might be that a font (helvetica-light) isn't embedded into the document. My >reason for suspecting this is that I have another file from the same person, >but with the font embedded and it loads just fine. > From reportlab-users@reportlab.com Wed Dec 11 21:03:03 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Wed, 11 Dec 2002 21:03:03 -0000 Subject: [reportlab-users] Problem importing file using PageCatcher In-Reply-To: <20021211165039.GB2704@martin> Message-ID: > Can anyone explain to me what might be wrong with the > document? I suspect that > it might be that a font (helvetica-light) isn't embedded > into the document. My > reason for suspecting this is that I have another file from > the same person, > but with the font embedded and it loads just fine. Aaron's offered to look at the file but there is one general rule to apply when this happens: open your file in Acrobat, export to postscript , and then run through Distiller. Then try again with the new PDF file. Adobe have put more effort than us into cleaning up dodgy PDF files, and what comes out of Distiller always seems to work with PageCatcher. You may not need Adobe tools on your server, but they're very handy to have around if you are working seriously with PDF :-) Thanks, Andy Robinson From reportlab-users@reportlab.com Wed Dec 11 21:00:18 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Wed, 11 Dec 2002 21:00:18 -0000 Subject: [reportlab-users] set default unit possible ? In-Reply-To: <200212111727.22169.dev-pdf@smartology.nl> Message-ID: > Is it possible to set a default unit with a stylesheet ? > > It's a bit of a hassle to append * mm/cm/inch to every value that > needs a unit in parsing an xml file with paragraphs. No it isn't at the moment. In our 'Report Markup Language' product, we allow people to do things like 16cm, 2in etc. by having a function 'readLength' which is applied to many tags and their attributes. But if no units are given then it is assumed to be in points. IMHO this is reasonable. It should be easy for you to subclass paragraph and insert a one-line 'hook' after the XML is parsed and before anything is done with it, and then iterate over all tags converting relevant attributes by a conversion factor. Best Regards, Andy Robinson From reportlab-users@reportlab.com Wed Dec 11 21:31:02 2002 From: reportlab-users@reportlab.com (Martin =?iso-8859-1?Q?Sk=F8tt?=) Date: Wed, 11 Dec 2002 22:31:02 +0100 Subject: [reportlab-users] Problem importing file using PageCatcher In-Reply-To: References: <20021211165039.GB2704@martin> Message-ID: <20021211213102.GA3569@martin> On Wed, Dec 11, 2002 at 09:03:03PM -0000, Andy Robinson wrote: > > Can anyone explain to me what might be wrong with the > > document? I suspect that > > it might be that a font (helvetica-light) isn't embedded > > into the document. My > > reason for suspecting this is that I have another file from > > the same person, > > but with the font embedded and it loads just fine. > > Aaron's offered to look at the file but there is one general > rule to apply when this happens: open your file in Acrobat, > export to postscript , and then run through Distiller. Then > try again with the new PDF file. Adobe have put more effort > than us into cleaning up dodgy PDF files, and what comes out > of Distiller always seems to work with PageCatcher. I will have to get our visual guy (the one with the windows machine) to try that tomorrow. I get an error message about an error in the document when I open it using xpdf. -- Med venlig hilsen Martin Skøtt Xenux ApS - The Linux People martin@xenux.dk From reportlab-users@reportlab.com Thu Dec 12 06:59:43 2002 From: reportlab-users@reportlab.com (Remy C. Cool) Date: Thu, 12 Dec 2002 07:59:43 +0100 Subject: [reportlab-users] set default unit possible ? In-Reply-To: References: Message-ID: <200212120759.43918.dev-pdf@smartology.nl> I'll look into that, thanks for the quick answer. Remy Cool On Wednesday 11 December 2002 22:00, Andy Robinson wrote: > > Is it possible to set a default unit with a stylesheet ? > > > > It's a bit of a hassle to append * mm/cm/inch to every value that > > needs a unit in parsing an xml file with paragraphs. > > No it isn't at the moment. In our 'Report Markup Language' > product, we allow people to do things like 16cm, 2in etc. > by having a function 'readLength' which is applied to > many tags and their attributes. But if no units are given > then it is assumed to be in points. IMHO this is reasonable. > > It should be easy for you to subclass paragraph and insert > a one-line 'hook' after the XML is parsed and before anything > is done with it, and then iterate over all tags converting > relevant attributes by a conversion factor. > > Best Regards, > > Andy Robinson From reportlab-users@reportlab.com Thu Dec 12 13:49:44 2002 From: reportlab-users@reportlab.com (Marc Stober) Date: Thu, 12 Dec 2002 08:49:44 -0500 Subject: [reportlab-users] Zope and Reportlab? Message-ID: <2546C8F5D3D2D411857F00508BDCA4E802E9D5@dalbar_mail.dalbar.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C2A1E5.5395E3B0 Content-Type: text/plain; charset="iso-8859-1" Just curious, what is this Zope/ReportLab product being discussed on this list? I know almost nothing about Zope, but if there's an introduction to this Zope/ReportLab product somewhere I'd find that interesting. Thanks, Marc Stober ------_=_NextPart_001_01C2A1E5.5395E3B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Zope and Reportlab?

Just curious, what is this Zope/ReportLab product = being discussed on this list? I know almost nothing about Zope, but if = there's an introduction to this Zope/ReportLab product somewhere I'd = find that interesting.

Thanks,
Marc Stober

------_=_NextPart_001_01C2A1E5.5395E3B0-- From reportlab-users@reportlab.com Thu Dec 12 14:06:39 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Thu, 12 Dec 2002 14:06:39 -0000 Subject: [reportlab-users] Release 1.17 and Mac binaries Message-ID: I hope we can do a release 1.17 before Christmas, probably late next week. We have some new chart types and features and the usual minor enhancements; and I hope coordinated releases of preppy and pyRXP with new functionality. One thing I would like to focus on is improving the setup process. Talking evaluators through the setup process for all their machines is becoming a real pain for us ;-) 3 things will help everyone: 1. distutils setup script - we could really use help on this from people who have built them before. 2. Is any kind person able to recompile some C libraries for MacOS 9 so we can offer those on the site? (OS X is presumably not a problem as everyone has a compiler). 3. RPMs, Debian packages etc. - we don't have resources to test them but if anyone (Michael Geddert?) wants to make them we will happily put them in a download area. So, we will try to 'hold the code steady' next week for a few days so others can help out on this, try their distro technology and thus leave time for changes to the setup script. thanks very much, Andy Robinson p.s. you can also start sending the usual reminders about patches we have forgotten ;-) From reportlab-users@reportlab.com Thu Dec 12 14:57:00 2002 From: reportlab-users@reportlab.com (David Hughes) Date: Thu, 12 Dec 2002 14:57 +0000 (GMT Standard Time) Subject: [reportlab-users] Submit code changes for consideration In-Reply-To: <20021211213102.GA3569@martin> Message-ID: I've recently joined this list after getting involved in creating pdf tables and charts using Reportlab in a wxPython project for the first time and I'm *very* pleased with the way it has gone. Possibly through my own ignorance, I found it necessary to make a few small changes to the charting software to achieve what I wanted. Is there a process for having these reviewed to see if they might be generally useful? The changes are: 1. Add UniCode type to the valid _isString types in lib/validators.py 2. To charts/barcharts.py, add "colorList = AttrMapValue(None, desc='List of (lists of) color index numbers, one per data item.')" and associated code to allow the colours of individual bars to be specified in similar fashion to pie chart wedges. 3. To charts/piecharts.py, add code to avoid wedge labels overwriting each other especially with a number of adjacent, thin wedges. I'll try and ftp a before and after example of this to reportlab.com/incoming (....Yes, just sent forestfield.zip that said it was received OK). Regards, David Hughes Forestfield Software Ltd www.forestfield.co.uk From reportlab-users@reportlab.com Thu Dec 12 15:25:07 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Thu, 12 Dec 2002 15:25:07 -0000 Subject: [reportlab-users] Submit code changes for consideration In-Reply-To: Message-ID: > I've recently joined this list after getting involved in creating pdf > tables and charts using Reportlab in a wxPython project for the > first time > and I'm *very* pleased with the way it has gone. One thing which would be really cool and useful is a little sample app in wxPython showing how to do this, if you have time - just the basics to show a non-wx person how to open and display a dynamic chart. Ideally we would collect these for Tkinter, wxPython, Zope and other web frameworks and put them in our docco. > Possibly through my own ignorance, I found it necessary to make a few > small changes to the charting software to achieve what I wanted. Is there > a process for having these reviewed to see if they might be generally > useful? You've just followed the procedure perfectly :-) The challenging part of the process is for us to actually review these and check them in when we have 5 customer deadlines and 50% of the staff off with flu....hassling and reminders are sometimes necessary. > > The changes are: > All sounds sensible, we will review and try to work these in next week. Thanks, Andy Robinson From reportlab-users@reportlab.com Thu Dec 12 15:41:36 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Thu, 12 Dec 2002 16:41:36 +0100 Subject: [reportlab-users] Submit code changes for consideration In-Reply-To: Message-ID: <32ACE34F-0DE8-11D7-8049-00039345C610@mac.com> --Apple-Mail-2--876529314 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Andy Robinson: > You've just followed the procedure perfectly :-) The challenging part > of the process is for us to actually review these and check them in > when we have 5 customer deadlines and 50% of the staff off with > flu....hassling and reminders are sometimes necessary. And then there is something like an SF bugtracking and patches mechanism, which is essentially a non-feature, since even the bugfixers and patchers don't use it! ;-) Dinu -- Dinu C. Gherman ...................................................................... "A whole generation has grown up with the idea that it is normal for them to have no freedom." (Richard M. Stallman) --Apple-Mail-2--876529314 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII Andy Robinson: You've just followed the procedure perfectly :-) The challenging part of the process is for us to actually review these and check them in when we have 5 customer deadlines and 50% of the staff off with flu....hassling and reminders are sometimes necessary. And then there is something like an SF bugtracking and patches mechanism, which is essentially a non-feature, since even the bugfixers and patchers don't use it! ;-) Dinu -- Dinu C. Gherman ...................................................................... "A whole generation has grown up with the idea that it is normal for them to have no freedom." (Richard M. Stallman) --Apple-Mail-2--876529314-- From reportlab-users@reportlab.com Thu Dec 12 20:52:39 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Thu, 12 Dec 2002 21:52:39 +0100 Subject: [reportlab-users] setup patch Message-ID: <3DF8F717.EAC57701@rasselstein-hoesch.de> Dies ist eine mehrteilige Nachricht im MIME-Format. --------------E8E119201C53E81938755191 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Andy, I worked on the right setup.py for linux SuSE SLES 7 with python 2.1. With that patch I can build a RPM via 'python setup.py bdist_rpm' without an error. I can also sent you the RPM I build with this configuration. Regards, Dirk --------------E8E119201C53E81938755191 Content-Type: text/plain; charset=us-ascii; name="reportlab-setup.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="reportlab-setup.patch" diff -uNr reportlab/MANIFEST.in reportlab-1.17/MANIFEST.in --- reportlab/MANIFEST.in Thu Jan 1 01:00:00 1970 +++ reportlab-1.17/MANIFEST.in Thu Dec 12 21:30:11 2002 @@ -0,0 +1,3 @@ +recursive-include fonts * +recursive-include docs * +recursive-include lib *.c *.h *.in diff -uNr reportlab/setup.py reportlab-1.17/setup.py --- reportlab/setup.py Thu Dec 12 21:45:41 2002 +++ reportlab-1.17/setup.py Thu Dec 12 21:43:43 2002 @@ -4,28 +4,31 @@ from distutils.core import setup, Extension +import sys + +package_path = "/usr/lib/python%s/site-packages/reportlab" % sys.version [:3] + + # why oh why don't most setup scripts have a script handler? # if you don't have one, you can't edit in Pythonwin def run(): LIBS = [] setup( name="Reportlab", - version="1.15.3", + version="1.17", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="info@reportlab.com", url="http://www.reportlab.com/", - package_dir = {'': '..'}, + package_dir = {'reportlab': '.'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', - 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', - 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', @@ -34,19 +37,21 @@ 'reportlab.pdfgen', 'reportlab.platypus', ], - data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', - 'docs/images/Python_21.gif', - 'docs/images/Python_21_HINT.gif', - 'docs/images/fileExchange.gif', - 'docs/images/jpn.gif', - 'docs/images/jpnchars.jpg', - 'docs/images/lj8100.jpg', - 'docs/images/replogo.a85', - 'docs/images/replogo.gif']), - ('fonts', ['fonts/LeERC___.AFM', - 'fonts/LeERC___.PFB', - 'fonts/luxiserif.ttf', - 'fonts/rina.ttf'] + data_files = [('%s/docs/images' % package_path, + ['docs/images/Edit_Prefs.gif', + 'docs/images/Python_21.gif', + 'docs/images/Python_21_HINT.gif', + 'docs/images/fileExchange.gif', + 'docs/images/jpn.gif', + 'docs/images/jpnchars.jpg', + 'docs/images/lj8100.jpg', + 'docs/images/replogo.a85', + 'docs/images/replogo.gif']), + ('%s/fonts' % package_path, + ['fonts/LeERC___.AFM', + 'fonts/LeERC___.PFB', + 'fonts/luxiserif.ttf', + 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', --------------E8E119201C53E81938755191-- From reportlab-users@reportlab.com Thu Dec 12 21:00:20 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Thu, 12 Dec 2002 22:00:20 +0100 Subject: [reportlab-users] renderPS drawToString patch Message-ID: <3DF8F8E4.B5E4F4D9@rasselstein-hoesch.de> Dies ist eine mehrteilige Nachricht im MIME-Format. --------------9303A543F907133FB2AAB9C0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Andy, here is the renderPS-drawToString patch. Regards, Dirk --------------9303A543F907133FB2AAB9C0 Content-Type: text/plain; charset=us-ascii; name="renderPS-drawToString.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="renderPS-drawToString.patch" diff -uNr reportlab/graphics/renderPS.py reportlab-1.17/graphics/renderPS.py --- reportlab/graphics/renderPS.py Thu Dec 12 21:57:04 2002 +++ reportlab-1.17/graphics/renderPS.py Thu Dec 12 21:56:43 2002 @@ -809,6 +809,12 @@ draw(d, c, 0, 0, showBoundary=showBoundary) c.save(fn) +def drawToString(d, showBoundary=rl_config.showBoundary): + "Returns a PS as a string in memory, without touching the disk" + s = getStringIO() + drawToFile(d, s, showBoundary=showBoundary) + return s.getvalue() + ######################################################### # # test code. First, defin a bunch of drawings. --------------9303A543F907133FB2AAB9C0-- From reportlab-users@reportlab.com Thu Dec 12 21:07:54 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Thu, 12 Dec 2002 22:07:54 +0100 Subject: [reportlab-users] Zope and Reportlab? Message-ID: <3DF8FAAA.3CC67DD0@rasselstein-hoesch.de> Hi Marc, Zope is a OpenSource Python based Web Application Server. More at http://www.zope.org You can plugin Products into Zope to improve the functionality of the server. One plugin is called (Zope)RenderPM. More at http://www.zope.org/Members/Dirk.Datzert/RenderPM . I'm currently looking for a new name since it is confused by reportlabs _renderPM modul - the bitmap renderer for reportlab graphics toolkit. I started this product to improve Zope with the functionality of reportlab to create graphics from SQL-Querys on the fly for our intranet. Regards, Dirk From reportlab-users@reportlab.com Thu Dec 12 21:51:35 2002 From: reportlab-users@reportlab.com (Dave Rogers) Date: Thu, 12 Dec 2002 16:51:35 -0500 Subject: [reportlab-users] Zope and Reportlab? References: <3DF8FAAA.3CC67DD0@rasselstein-hoesch.de> Message-ID: <3DF904E7.54A3A6A6@StockAlerts.com> Hi Marc, As an alternative to Zope, I use reportlab in conjunction with Webware. Webware is a Web Application Server for Python, but it has a much more natural integration with the python language. It supports servelets and Python server pages. I generate PDF's on demand through web URL's and have them appear in a new window. The data originates from a database that has seamless object to RDB table mapping using a Webware add-on called MiddleKit. It works very well and was rather easy to setup (even if it sounds fancy). I find Zope to be one of the strangest pieces of software I have ever seen. If you are curious this page provides some insights into those who point out zope's flaws: http://zope-is-evil-666.idyll.org/ Webware is open source and at http://webware.sourceforge.net/ Best Regards, Dirk Datzert wrote: > Hi Marc, > > Zope is a OpenSource Python based Web Application Server. More at > http://www.zope.org > You can plugin Products into Zope to improve the functionality of the > server. > One plugin is called (Zope)RenderPM. More at > http://www.zope.org/Members/Dirk.Datzert/RenderPM . I'm currently > looking for a new name > since it is confused by reportlabs _renderPM modul - the bitmap renderer > for reportlab graphics toolkit. > > I started this product to improve Zope with the functionality of > reportlab to create graphics from SQL-Querys on the fly for our > intranet. > > Regards, > Dirk > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users -- Dave Rogers DaveRogers@StockAlerts.com http://StockAlerts.com From reportlab-users@reportlab.com Thu Dec 12 23:28:45 2002 From: reportlab-users@reportlab.com (Paul Winkler) Date: Thu, 12 Dec 2002 15:28:45 -0800 Subject: [reportlab-users] Zope and Reportlab? In-Reply-To: <3DF904E7.54A3A6A6@StockAlerts.com> References: <3DF8FAAA.3CC67DD0@rasselstein-hoesch.de> <3DF904E7.54A3A6A6@StockAlerts.com> Message-ID: <20021212232845.GA804@slinkp.com> On Thu, Dec 12, 2002 at 04:51:35PM -0500, Dave Rogers wrote: > If you are curious this page provides some insights into those who point out zope's flaws: http://zope-is-evil-666.idyll.org/ That page is two and a half years old, and about as accurate as you'd expect given its age. But this page.... http://www.amk.ca/python/writing/why-not-zope.html ... has some more serious points worth considering, some of which still apply to current versions of Zope. moving along now... --PW -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!" From reportlab-users@reportlab.com Fri Dec 13 08:18:48 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 13 Dec 2002 08:18:48 -0000 Subject: [reportlab-users] setup patch In-Reply-To: <3DF8F717.EAC57701@rasselstein-hoesch.de> Message-ID: Thanks. Robin Becker is off with flu this week but he's going to be the release coordinator and check and apply all these. I'm tied up with 'manager stuff' rest of the week so won't apply these just now. We've now got two Linux volunteers, Michael and Dirk. That's good - maybe you could coordinate so one builds and one tests? Thanks, Andy > -----Original Message----- > From: reportlab-users-admin@reportlab.com > [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Dirk Datzert > Sent: 12 December 2002 20:53 > To: reportlab > Subject: [reportlab-users] setup patch > > > Hi Andy, > > I worked on the right setup.py for linux SuSE SLES 7 with python 2.1. > With that patch I can build a RPM via 'python setup.py bdist_rpm' > without an error. I can also sent you the RPM I build with this > configuration. > > Regards, > Dirk From reportlab-users@reportlab.com Fri Dec 13 08:27:15 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 13 Dec 2002 08:27:15 -0000 Subject: [reportlab-users] Zope and Reportlab? In-Reply-To: <3DF904E7.54A3A6A6@StockAlerts.com> Message-ID: I hope our chart software > If you are curious this page provides some insights into those > who point out zope's flaws: http://zope-is-evil-666.idyll.org/ I felt these frustrations once myself, but many others did not. IMHO you need some guidance on 'the right way to do it' with Zope because if you start off the wrong way it gets very frustrating. The docco and the arrival of a couple of books since this page came out have helped, apparently. Zope 3 is addressing most of these issues head on, I understand. > > Webware is open source and at http://webware.sourceforge.net/ Now that DOES look promising. Just looking at the overview I would say it has design goals and a philosophy that really reassure me. Now if only the authors of Twisted, Zope 3, preppy, Quixote et al could be locked in one room for a month, and the results put in the standard library.... - Andy From reportlab-users@reportlab.com Fri Dec 13 10:15:36 2002 From: reportlab-users@reportlab.com (H. Turgut Uyar) Date: Fri, 13 Dec 2002 12:15:36 +0200 Subject: [reportlab-users] Using the XMLmind editor for Pythonpoint presentations References: Message-ID: <3DF9B348.6030805@cs.itu.edu.tr> Hello, I have found that it is fairly easy to use the XMLmind XML editor to prepare Pythonpoint presentations. Now I can create new presentations or edit existing ones where almost all elements will be displayed in a nearly-wysiwyg fashion. The editor also checks for validity of the document. Since other people also expressed a similar need I decided to share my solution. Here's how to use it: 1- Install the XMLmind XML editor. You can download the standard edition for free from http://www.xmlmind.com/xmleditor/. (I am using the 2.0patch1 version for Windows). 2- Get the file http://www.cs.itu.edu.tr/~uyar/ppoint/pythonpoint.zip and extract it to the folder c:\program files\xmlmind_xml_editor\config (haven't tested on linux yet). This will overwrite the config.xml file and create a pythonpoint directory. 3- Start up the editor and use 'New' or 'Open'. You might need to read the editor's tutorials to get accustomed to it. Most elements will be displayed correctly and if an element cannot be displayed (such as lines, rectangles etc.) you will see gray boxes where you can edit their attributes. The only problem is with table, prefmt and pycode elements: I could not get the editor to preserve white space when saving the file. I would be happy to hear your comments and suggestions. Any help would be greatly appreciated. As a final note, I had to change the pythonpoint dtd a little. I added effect attributes to para, table, image and shape elements. And I had to change the following line because the xmlmind editor claimed it was incorrect: old line: new line: I'm not sure what I'm doing here, I was just trying to get rid of the error :-) I named the new dtd as version 0.1g to get the editor reload it. This version of the dtd can be downloaded from http://www.cs.itu.edu.tr/~uyar/ppoint/pythonpoint.dtd. -- Turgut Uyar From reportlab-users@reportlab.com Fri Dec 13 10:43:33 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 13 Dec 2002 10:43:33 -0000 Subject: [reportlab-users] Using the XMLmind editor for Pythonpoint presentations In-Reply-To: <3DF9B348.6030805@cs.itu.edu.tr> Message-ID: > Hello, Thanks, we will add this to our queue for next week. Also I still have not cracked the UTF8 problem in one of the presentations you sent us. Are you working next week so I can contact you and try to fix this? > 1- Install the XMLmind XML editor. You can download the standard edition > for free > from http://www.xmlmind.com/xmleditor/. (I am using the 2.0patch1 > version for > Windows). This looks REALLY good! A free (for reasonable use) editor which validates. I will have a good play with it and see if we could make it a recommended standard editor for Pythonpoint. Thanks, Andy From reportlab-users@reportlab.com Fri Dec 13 16:21:00 2002 From: reportlab-users@reportlab.com (David Hughes) Date: Fri, 13 Dec 2002 16:21 +0000 (GMT Standard Time) Subject: [reportlab-users] Submit code changes for consideration In-Reply-To: Message-ID: > One thing which would be really cool and useful is a little > sample app in wxPython showing how to do this, if you have > time - just the basics to show a non-wx person how > to open and display a dynamic chart. I will try and produce something. The simpler you want it, the more work its going to be. ;-) > The challenging part > of the process is for us to actually review these and check them in > when we have ... I've just sent along forestfield_code.zip for you to review at your leisure. Regards, David Hughes Forestfield Software Ltd www.forestfield.co.uk From reportlab-users@reportlab.com Fri Dec 13 17:04:07 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Fri, 13 Dec 2002 18:04:07 +0100 Subject: [reportlab-users] Release 1.17 and Mac binaries In-Reply-To: Message-ID: Andy Robinson: > I hope we can do a release 1.17 before Christmas, > probably late next week. We have some new chart types > and features and the usual minor enhancements; > and I hope coordinated releases of preppy and > pyRXP with new functionality. Unless already available, would it hurt to have tarballs for *all* these goodies? I think especially of renderPM, which used to be (and maybe still is) available only via CVS. It's often a pain to point people to CVS repositories... Dinu -- Dinu C. Gherman ...................................................................... Enjoy a special flight experience: http://www.deportation-class.com From reportlab-users@reportlab.com Fri Dec 13 18:18:35 2002 From: reportlab-users@reportlab.com (Dave Rogers) Date: Fri, 13 Dec 2002 13:18:35 -0500 Subject: [reportlab-users] Problem with drawImage in 1.16 not seen in 1.15 References: Message-ID: <3DFA247B.2E4827A7@StockAlerts.com> Hi, When using the drawImage method in 1.16, everything appears to work when executing the code. However, when I open the PDF in Acrobat 5.1, the images are not present and I get an error regarding loading the image data. The same exact code works in Version 1.15. When I switch to drawInlineImage, it works in 1.16, but since I use one of my images on each page, the files are proportionally larger. I didn't look at the actual code, but it seems like this could be a bug. I use Python 2.1.3 on Windows2K. Any ideas or suggestions? -- Dave Rogers DaveRogers@StockAlerts.com http://StockAlerts.com From reportlab-users@reportlab.com Fri Dec 13 18:55:23 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Fri, 13 Dec 2002 18:55:23 +0000 Subject: [reportlab-users] Problem with drawImage in 1.16 not seen in 1.15 In-Reply-To: <3DFA247B.2E4827A7@StockAlerts.com> References: <3DFA247B.2E4827A7@StockAlerts.com> Message-ID: In article <3DFA247B.2E4827A7@StockAlerts.com>, Dave Rogers writes >Hi, > >When using the drawImage method in 1.16, everything appears to work when >executing the code. However, when I open the PDF in Acrobat 5.1, the images are >not present and I get an error regarding loading the image data. > >The same exact code works in Version 1.15. When I switch to drawInlineImage, it >works in 1.16, but since I use one of my images on each page, the files are >proportionally larger. I didn't look at the actual code, but it seems like this >could be a bug. > >I use Python 2.1.3 on Windows2K. > >Any ideas or suggestions? > ..... there was a bug in 1.16 relating to image use. drawInlineImage works, but I messed something up trying to get JPG type images, PIL and a85 to work similarly in drawImage mode. I think it is now fixed. -- Robin Becker From reportlab-users@reportlab.com Fri Dec 13 19:15:19 2002 From: reportlab-users@reportlab.com (Dave Rogers) Date: Fri, 13 Dec 2002 14:15:19 -0500 Subject: [reportlab-users] Another problem -- pdfgen\textObject References: <3DFA247B.2E4827A7@StockAlerts.com> Message-ID: <3DFA31C7.55990E7B@StockAlerts.com> --------------0440CCE3EE7262BA4B619486 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thanks for the quick reply Robin re the drawImage. I'm also having another problem -- this one with pdfgen\textObject.py Based on my understanding, if I send a trim=0, no whitespace should be removed. However, I noticed that the code removes leading whitespace on string types (which is a problem for me) even with a trim=0. I have edited my local version to be this (see the comment with the 'dr' in it -- that's what I added to preserve leading whitespace): def textLines(self, stuff, trim=1): """prints multi-line or newlined strings, moving down. One comon use is to quote a multi-line block in your Python code; since this may be indented, by default it trims whitespace off each line and from the beginning; set trim=0 to preserve whitespace.""" if type(stuff) == StringType: if trim==1: lines = string.split(string.strip(stuff), '\n') else: lines = string.split(stuff, '\n') # preserve leading white space dr 10-31-02 if trim==1: lines = map(string.strip,lines) elif type(stuff) == ListType: lines = stuff elif type(stuff) == TupleType: lines = stuff else: assert 1==0, "argument to textlines must be string,, list or tuple" for line in lines: self._code.append('%s T*' % self._formatText(line)) if self._canvas.bottomup: self._y = self._y - self._leading else: self._y = self._y + self._leading self._x = self._x0 Any idea if this will be corrected in 1.17? Thanks, -- Dave Rogers DaveRogers@StockAlerts.com http://StockAlerts.com --------------0440CCE3EE7262BA4B619486 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Thanks for the quick reply Robin re the drawImage.

I'm also having another problem -- this one with pdfgen\textObject.py

Based on my understanding, if I send a trim=0, no whitespace should be removed.

However, I noticed that the code removes leading whitespace on string types (which is a problem for me) even with a trim=0.

I have edited my local version to be this (see the comment with the 'dr'  in it -- that's what I added to preserve leading whitespace):

    def textLines(self, stuff, trim=1):
        """prints multi-line or newlined strings, moving down.  One
        comon use is to quote a multi-line block in your Python code;
        since this may be indented, by default it trims whitespace
        off each line and from the beginning; set trim=0 to preserve
        whitespace."""
        if type(stuff) == StringType:
            if trim==1:
              lines = string.split(string.strip(stuff), '\n')
            else:
              lines = string.split(stuff, '\n') # preserve leading white space dr 10-31-02
            if trim==1:
                lines = map(string.strip,lines)
        elif type(stuff) == ListType:
            lines = stuff
        elif type(stuff) == TupleType:
            lines = stuff
        else:
            assert 1==0, "argument to textlines must be string,, list or tuple"

        for line in lines:
            self._code.append('%s T*' % self._formatText(line))
            if self._canvas.bottomup:
                self._y = self._y - self._leading
            else:
                self._y = self._y + self._leading
        self._x = self._x0

Any idea if this will be corrected in 1.17?

Thanks,
--
Dave Rogers
DaveRogers@StockAlerts.com
http://StockAlerts.com
  --------------0440CCE3EE7262BA4B619486-- From reportlab-users@reportlab.com Fri Dec 13 18:54:17 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 13 Dec 2002 18:54:17 -0000 Subject: [reportlab-users] Problem with drawImage in 1.16 not seen in 1.15 In-Reply-To: <3DFA247B.2E4827A7@StockAlerts.com> Message-ID: > Hi, > > When using the drawImage method in 1.16, everything appears to > work when executing the code. However, when I open the PDF in > Acrobat 5.1, the images are not present and I get an error > regarding loading the image data. > > The same exact code works in Version 1.15. When I switch to > drawInlineImage, it works in 1.16, but since I use one of my > images on each page, the files are proportionally larger. I > didn't look at the actual code, but it seems like this could be a bug. > We fixed an image bug recently and I think this might be it. Can you grab the current.zip / current.tgz from our download directory and try with last night's code? - Andy From reportlab-users@reportlab.com Fri Dec 13 20:13:16 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Fri, 13 Dec 2002 20:13:16 +0000 Subject: [reportlab-users] Another problem -- pdfgen\textObject In-Reply-To: <3DFA31C7.55990E7B@StockAlerts.com> References: <3DFA247B.2E4827A7@StockAlerts.com> <3DFA31C7.55990E7B@StockAlerts.com> Message-ID: <8X0eSFBc9j+9Ewro@jessikat.fsnet.co.uk> In article <3DFA31C7.55990E7B@StockAlerts.com>, Dave Rogers writes > Thanks for the quick reply Robin re the drawImage. > > I'm also having another problem -- this one with > pdfgen\textObject.py > > Based on my understanding, if I send a trim=0, no whitespace should > be removed. > > However, I noticed that the code removes leading whitespace on > string types (which is a problem for me) even with a trim=0. > ...... > > Any idea if this will be corrected in 1.17? > > Thanks, So far as I understand it this dates back to Andy's original implementation where the idea was to strip off leading space. It seems to have two applications of strip, one to eliminate leading & trailing space from the whole and a second controlled one to strip from each line. The first one will strip any number of blank lines so I'm a bit worried about making it optional. -- Robin Becker From reportlab-users@reportlab.com Sat Dec 14 08:32:28 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 14 Dec 2002 09:32:28 +0100 Subject: [reportlab-users] Release 1.17 and Mac binaries References: Message-ID: <3DFAEC9C.2DFA04FA@rasselstein-hoesch.de> > Unless already available, would it hurt to have tarballs for *all* > these goodies? I think especially of renderPM, which used to be > (and maybe still is) available only via CVS. It's often a pain to > point people to CVS repositories... I would made linux RPM files from pyRXP and _renderPM if wanted ! Regards, Dirk From reportlab-users@reportlab.com Sat Dec 14 09:14:50 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Sat, 14 Dec 2002 10:14:50 +0100 Subject: [reportlab-users] Release 1.17 and Mac binaries In-Reply-To: <3DFAEC9C.2DFA04FA@rasselstein-hoesch.de> Message-ID: <7FE7C094-0F44-11D7-BD19-00039345C610@darwin.in-berlin.de> --Apple-Mail-2--726934881 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Dirk Datzert: > I would made linux RPM files from pyRXP and _renderPM if wanted ! I know there is quite some meta info going into these packages, but is there *some* way to automate this, at least partially, maybe? Think of something along the lines of my CVS sniffing and con- verting tools resulting in regularly updated RDF files like these (Python and ReportLab repositories at SF, respectively): http://me.in-berlin.de/~darwin/cvspysf.rdf http://me.in-berlin.de/~darwin/cvsrlsf.rdf An automatic build triggered by a new CVS tag would be quite nice, unless, of course, this is on the PBF/snakefarm's todo list, but well... I think I'll give it a try next week... Also, please note that, AFAIK, Gregor Hoffleit (see CC line) al- ready does, silently, make Debian packages for reportlab, but I'm not sure about the other goodies. Gregor? Regards, Dinu -- Dinu C. Gherman ...................................................................... Enjoy a special flight experience: http://www.deportation-class.com --Apple-Mail-2--726934881 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII Dirk Datzert: I would made linux RPM files from pyRXP and _renderPM if wanted ! I know there is quite some meta info going into these packages, but is there *some* way to automate this, at least partially, maybe? Think of something along the lines of my CVS sniffing and con- verting tools resulting in regularly updated RDF files like these (Python and ReportLab repositories at SF, respectively): http://me.in-berlin.de/~darwin/cvspysf.rdf http://me.in-berlin.de/~darwin/cvsrlsf.rdf An automatic build triggered by a new CVS tag would be quite nice, unless, of course, this is on the PBF/snakefarm's todo list, but well... I think I'll give it a try next week... Also, please note that, AFAIK, Gregor Hoffleit (see CC line) al- ready does, silently, make Debian packages for reportlab, but I'm not sure about the other goodies. Gregor? Regards, Dinu -- Dinu C. Gherman ...................................................................... Enjoy a special flight experience: http://www.deportation-class.com --Apple-Mail-2--726934881-- From reportlab-users@reportlab.com Sat Dec 14 10:50:19 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 14 Dec 2002 11:50:19 +0100 Subject: [reportlab-users] Release 1.17 and Mac binaries References: <7FE7C094-0F44-11D7-BD19-00039345C610@darwin.in-berlin.de> Message-ID: <3DFB0CEB.A3E3D28D@rasselstein-hoesch.de> Dinu Gherman schrieb: > > Dirk Datzert: > > I would made linux RPM files from pyRXP and _renderPM if wanted ! > > I know there is quite some meta info going into these packages, > but is there *some* way to automate this, at least partially, > maybe? Which meta info do you mean ? I made RPMs with the setup.py command, which I changed a little to do the bdist_rpm job well. > > http://me.in-berlin.de/~darwin/cvspysf.rdf > http://me.in-berlin.de/~darwin/cvsrlsf.rdf I looked at the RDFs but I did not understand what this has to do with RPM ? > > An automatic build triggered by a new CVS tag would be quite nice, > unless, of course, this is on the PBF/snakefarm's todo list, but > well... I think I'll give it a try next week... > > ready does, silently, make Debian packages for reportlab, but I'm Ok, I will be more precise: I would made RPM for SuSE linux, if wanted ! From reportlab-users@reportlab.com Sat Dec 14 12:03:58 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Sat, 14 Dec 2002 13:03:58 +0100 Subject: [reportlab-users] Release 1.17 and Mac binaries In-Reply-To: <3DFB0CEB.A3E3D28D@rasselstein-hoesch.de> Message-ID: <20A19C7A-0F5C-11D7-A8DF-00039345C610@darwin.in-berlin.de> Dirk Datzert: > Which meta info do you mean ? I made RPMs with the setup.py command, > which I changed a little to do the bdist_rpm job well. Dependancy information, description text, etc. Dinu -- Dinu C. Gherman ...................................................................... "The pure and simple truth is rarely pure and never simple." (Oscar Wilde) -- Dinu C. Gherman ...................................................................... "He who can read but does not read good books has no advantage over the ones who can't read." (Mark Twain) From reportlab-users@reportlab.com Sat Dec 14 13:03:34 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 14 Dec 2002 14:03:34 +0100 Subject: [reportlab-users] Release 1.17 and Mac binaries References: <20A19C7A-0F5C-11D7-A8DF-00039345C610@darwin.in-berlin.de> Message-ID: <3DFB2C26.3C58396E@rasselstein-hoesch.de> Dinu Gherman schrieb: > > Dirk Datzert: > > > Which meta info do you mean ? I made RPMs with the setup.py command, > > which I changed a little to do the bdist_rpm job well. > > Dependancy information, description text, etc. Dependancy info will be guessed by RPM automatically and for description text there should be 2 fields in setup.py : description, long_description Regards, Dirk From reportlab-users@reportlab.com Sat Dec 14 16:05:54 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sat, 14 Dec 2002 17:05:54 +0100 Subject: [reportlab-users] reportlab-setup.patch Message-ID: <3DFB56E2.6776899B@rasselstein-hoesch.de> Hi Michael, can you mail me your address again ? I have updated the reportlab-setup.patch and want sent it to you. Regards, Dirk From reportlab-users@reportlab.com Sun Dec 15 12:53:41 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Sun, 15 Dec 2002 13:53:41 +0100 Subject: [reportlab-users] PythonPoint issues on reportlab.com Message-ID: <3D03D6BA-102C-11D7-A8DF-00039345C610@darwin.in-berlin.de> Hi, today a user pointed me privately on some nasty buglet on the reportlab.com website: > http://www.reportlab.com/demos/pythonpoint/pythonpoint.html > > As a totally > trivial point, the ancillary commentary on the Web page above mentions > that PythonPoint is located in the tarball under reportlab/demos; it's > actually under reportlab/tools. I also noted that this page seems not to be using the new page style... If anybody has time to fix it... Regards, Dinu -- Dinu C. Gherman ...................................................................... Make your own Bush speech: http://www.lemonbovril.co.uk/bushspeech From reportlab-users@reportlab.com Tue Dec 17 17:09:16 2002 From: reportlab-users@reportlab.com (Robert Krieg) Date: Tue, 17 Dec 2002 09:09:16 -0800 Subject: [reportlab-users] (no subject) Message-ID: <38FC1F2515BFFD4E904B82A1C2A047B89C354E@oak2kmail.stcg.net> Hi, I am creating an app which generates a platypus SimpleDocTemplate table formatted .pdf document from a user supplied SQL database and query. I am unable to know the correct page sizes (i.e. - portrait/landscape) beforehand, as a result of the user supplying the query. If there are too many elements in the query and the page sizes are set to portrait, I get the error message. " LayoutError: Flowable with cell(0,0) containing 'LASTNAME' too large on page 2 " At this point in the program, I catch the error and assign the page sizes to that of Landscape, and try to "re-build" the template. I get the following error:=20 Traceback (most recent call last): File "C:\Python22\rLab\reportTemplate.py", line 189, in ? report.run() File "C:\Python22\rLab\reportTemplate.py", line 184, in run self.goLandscape( result ) File "C:\Python22\rLab\reportTemplate.py", line 126, in goLandscape docTemplate.build( ( myStory ), onFirstPage=3Dself.myFirstPage, onLaterPages=3Dself.myLaterPages ) File "c:\Python22\ReportLab_1_16\reportlab\platypus\doctemplate.py", line 750, in build BaseDocTemplate.build(self,flowables) TypeError: unbound method build() must be called with BaseDocTemplate instance as first=20 argument (got SimpleDocTemplate instance instead) It seems as though the package was not set up to work in this fashion. Is there an easier way to accomplish this automatic switch to landscape when "Layout Error" exception is raised. Thanks, Rob From reportlab-users@reportlab.com Tue Dec 17 20:22:55 2002 From: reportlab-users@reportlab.com (Robert Krieg) Date: Tue, 17 Dec 2002 12:22:55 -0800 Subject: [reportlab-users] landscape vs. portrait format handling Message-ID: <38FC1F2515BFFD4E904B82A1C2A047B89BFA85@oak2kmail.stcg.net> Hi, I am creating an app which generates a platypus SimpleDocTemplate table formatted .pdf document from a user supplied SQL database and query. I am unable to know the correct page sizes (i.e. - portrait/landscape) beforehand, as a result of the user supplying the query. If there are too many elements in the query and the page sizes are set to portrait, I get the error message. " LayoutError: Flowable
with cell(0,0) containing 'LASTNAME' too large on page 2 " At this point in the program, I catch the error and assign the page sizes to that of Landscape, and try to "re-build" the template. I get the following error:=20 Traceback (most recent call last): File "C:\Python22\rLab\reportTemplate.py", line 189, in ? report.run() File "C:\Python22\rLab\reportTemplate.py", line 184, in run self.goLandscape( result ) File "C:\Python22\rLab\reportTemplate.py", line 126, in goLandscape docTemplate.build( ( myStory ), onFirstPage=3Dself.myFirstPage, onLaterPages=3Dself.myLaterPages ) File "c:\Python22\ReportLab_1_16\reportlab\platypus\doctemplate.py", line 750, in build BaseDocTemplate.build(self,flowables) TypeError: unbound method build() must be called with BaseDocTemplate instance as first=20 argument (got SimpleDocTemplate instance instead) It seems as though the package was not set up to work in this fashion. Is there an easier way to accomplish this automatic switch to landscape when "Layout Error" exception is raised. Thanks, Rob From reportlab-users@reportlab.com Wed Dec 18 22:28:49 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Wed, 18 Dec 2002 23:28:49 +0100 Subject: [reportlab-users] reportlab-setup patch Message-ID: <3E00F6A1.C35989CE@rasselstein-hoesch.de> Dies ist eine mehrteilige Nachricht im MIME-Format. --------------1F8E71C9EFB9E40A7342DF11 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, here is my last patch for setup.py. I could build RPMs without any problems. Hope that it'll work on all plattforms, but I could only test on SLES. Regards, Dirk --------------1F8E71C9EFB9E40A7342DF11 Content-Type: text/plain; charset=us-ascii; name="reportlab-setup.patch4" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="reportlab-setup.patch4" diff -uNr reportlab/MANIFEST.in reportlab-1.17/MANIFEST.in --- reportlab/MANIFEST.in Thu Jan 1 01:00:00 1970 +++ reportlab-1.17/MANIFEST.in Sat Dec 14 21:38:10 2002 @@ -0,0 +1,5 @@ +recursive-include fonts * +recursive-include docs * +recursive-include lib *.c *.h *.in hyphen.mashed +recursive-include test *.gif +include changes license.txt README diff -uNr reportlab/setup.py reportlab-1.17/setup.py --- reportlab/setup.py Sun Dec 15 10:21:39 2002 +++ reportlab-1.17/setup.py Sun Dec 15 10:20:06 2002 @@ -4,28 +4,55 @@ from distutils.core import setup, Extension +import os, sys, distutils + +# from Zope - App.Common.package_home + +def package_home(globals_dict): + __name__=globals_dict['__name__'] + m=sys.modules[__name__] + r=os.path.split(m.__path__[0])[0] + return r + +pjoin = os.path.join + +package_path = pjoin(package_home(distutils.__dict__), 'site-packages', 'reportlab') + + # why oh why don't most setup scripts have a script handler? # if you don't have one, you can't edit in Pythonwin def run(): LIBS = [] setup( name="Reportlab", - version="1.15.3", + version="1.17", + licence="BSD license, Copyright (c) 2000-2003, ReportLab Inc.", description="Reportlab PDF generation tools", + long_description="""The ReportLab PDF Generation tools. +An Open Source Python library for generating PDFs. + +This installer created using distutils by John Precedo. +""", + author="The boys from SW19", author_email="info@reportlab.com", url="http://www.reportlab.com/", - package_dir = {'': '..'}, + package_dir = {'reportlab': '.'}, packages=[ # include anything with an __init__ 'reportlab', + 'reportlab.demos', + 'reportlab.demos.colors', + 'reportlab.demos.gadflypaper', + 'reportlab.demos.odyssey', + 'reportlab.demos.rlzope', + 'reportlab.demos.stdfonts', + 'reportlab.demos.tests', 'reportlab.docs', 'reportlab.docs.graphguide', - 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', - 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', @@ -33,37 +60,54 @@ 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', - ], - data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', - 'docs/images/Python_21.gif', - 'docs/images/Python_21_HINT.gif', - 'docs/images/fileExchange.gif', - 'docs/images/jpn.gif', - 'docs/images/jpnchars.jpg', - 'docs/images/lj8100.jpg', - 'docs/images/replogo.a85', - 'docs/images/replogo.gif']), - ('fonts', ['fonts/LeERC___.AFM', - 'fonts/LeERC___.PFB', - 'fonts/luxiserif.ttf', - 'fonts/rina.ttf'] - )], + 'reportlab.test', + 'reportlab.tools', + 'reportlab.tools.docco', + 'reportlab.tools.py2pdf', + 'reportlab.tools.pythonpoint', + 'reportlab.tools.pythonpoint.demos', + 'reportlab.tools.pythonpoint.styles', + ], + data_files = [(pjoin(package_path, 'docs', 'images'), + ['docs/images/Edit_Prefs.gif', + 'docs/images/Python_21.gif', + 'docs/images/Python_21_HINT.gif', + 'docs/images/fileExchange.gif', + 'docs/images/jpn.gif', + 'docs/images/jpnchars.jpg', + 'docs/images/lj8100.jpg', + 'docs/images/replogo.a85', + 'docs/images/replogo.gif']), + (pjoin(package_path, 'fonts'), + ['fonts/LeERC___.AFM', + 'fonts/LeERC___.PFB', + 'fonts/luxiserif.ttf', + 'fonts/rina.ttf']), + (package_path, + ['README', + 'changes', + 'license.txt']), + (pjoin(package_path, 'test'), + ['test/pythonpowered.gif',]), + (pjoin(package_path, 'lib'), + ['lib/hyphen.mashed',]), + ], - ext_modules = [Extension( '_rl_accel', + ext_modules = [Extension( 'reportlab/lib/_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), - Extension( 'sgmlop', + Extension( 'reportlab/lib/sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), - Extension( 'pyHnj', + Extension( 'reportlab/lib/pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], --------------1F8E71C9EFB9E40A7342DF11-- From reportlab-users@reportlab.com Thu Dec 19 16:11:26 2002 From: reportlab-users@reportlab.com (Martin =?iso-8859-1?Q?Sk=F8tt?=) Date: Thu, 19 Dec 2002 17:11:26 +0100 Subject: [reportlab-users] Placement of forms when using doForms()? Message-ID: <20021219161126.GA3502@martin> I'm placing pdf files as backgrounds on other pdf files by importing them into forms using pageCatcher.restoreForms and later on Canvas.doForm(). The problem is that the background is not placed exactly on the page, but a bit down and to the right. I have tried calling Canvas.translate(0,0) before doForm(), but it didn't help. Any suggestions on what I might do be doing wrong? -- Martin Skøtt Xenux ApS - The Linux People martin@xenux.dk From reportlab-users@reportlab.com Thu Dec 19 18:35:45 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Thu, 19 Dec 2002 18:35:45 -0000 Subject: [reportlab-users] Placement of forms when using doForms()? In-Reply-To: <20021219161126.GA3502@martin> Message-ID: > I'm placing pdf files as backgrounds on other pdf files by importing them > into forms using pageCatcher.restoreForms and later on Canvas.doForm(). > The problem is that the background is not placed exactly on the > page, but a bit > down and to the right. I have tried calling Canvas.translate(0,0) before > doForm(), but it didn't help. Any suggestions on what I might do be doing > wrong? You need non-zero values in Canvas.translate(..) or it won't do anything :-) Is the size of the original page you made into a form the same size as the output page you are drawing? eg. if you took a letter size page and made it into a form, then drew it on A4, it would 'miss' because the origin is the bottom left corner. It's easy to assume someone else's pre-printed document is A4 when it is not exactly that size. Forms have no intrinsic size. Think of it as very large overhead 'projector slide' or piece of tracing paper you can move around. Thanks, Andy From reportlab-users@reportlab.com Thu Dec 19 23:50:22 2002 From: reportlab-users@reportlab.com (Joel A. Walberg) Date: Thu, 19 Dec 2002 18:50:22 -0500 Subject: [reportlab-users] 2.1 Basic Concepts Message-ID: <200212191850.22081.joelbert@digital51.com> --------------Boundary-00=_YV4EYUT7G5IGIZX7A4YR Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm working through the ReportLab User Guide v 1.15, section 2.1 Basic=20 Concepts. The line =09hello(c) does not work. Any advise?=20 ------------------------- Joel A. Walberg joelbert@digital51.com --------------Boundary-00=_YV4EYUT7G5IGIZX7A4YR Content-Type: text/x-python; charset="us-ascii"; name="2.1.py" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="2.1.py" #!/usr/bin/python import reportlab from reportlab.pdfgen import canvas from reportlab import hello c = canvas.Canvas("hello.pdf") hello(c) c.showPage() c.save() --------------Boundary-00=_YV4EYUT7G5IGIZX7A4YR-- From reportlab-users@reportlab.com Fri Dec 20 00:06:03 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Fri, 20 Dec 2002 00:06:03 +0000 Subject: [reportlab-users] 2.1 Basic Concepts In-Reply-To: <200212191850.22081.joelbert@digital51.com> References: <200212191850.22081.joelbert@digital51.com> Message-ID: In article <200212191850.22081.joelbert@digital51.com>, Joel A. Walberg writes >I'm working through the ReportLab User Guide v 1.15, section 2.1 Basic >Concepts. > >The line > hello(c) >does not work. > >Any advise? > >------------------------- >Joel A. Walberg >joelbert@digital51.com >[ A MIME text / x-python part was included here. ] > try deleting that line it looks both wrong and redundant. -- Robin Becker From reportlab-users@reportlab.com Fri Dec 20 00:11:23 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Fri, 20 Dec 2002 00:11:23 +0000 Subject: [reportlab-users] 2.1 Basic Concepts In-Reply-To: <200212191850.22081.joelbert@digital51.com> References: <200212191850.22081.joelbert@digital51.com> Message-ID: In article <200212191850.22081.joelbert@digital51.com>, Joel A. Walberg writes >I'm working through the ReportLab User Guide v 1.15, section 2.1 Basic >Concepts. > >The line > hello(c) >does not work. > >Any advise? > whoops spoke too soon. The hello(c) line refers to a missing function. try adding the following at the top def hello(c): c.drawString(100,100,"Hello World") -- Robin Becker From reportlab-users@reportlab.com Fri Dec 20 09:47:27 2002 From: reportlab-users@reportlab.com (Remy C. Cool) Date: Fri, 20 Dec 2002 10:47:27 +0100 Subject: [reportlab-users] use euro symbol Message-ID: <200212201047.27171.dev-pdf@smartology.nl> According to the winAnsi encoding table, the Euro (¤) sign is supported, but the generated pdf shows a ? sign. How can I get the euro sign in the pdf when I feed text from an xml (unicode/iso8859-15) source? Regards, Remy From reportlab-users@reportlab.com Fri Dec 20 09:57:43 2002 From: reportlab-users@reportlab.com (Remy C. Cool) Date: Fri, 20 Dec 2002 10:57:43 +0100 Subject: [reportlab-users] use euro symbol In-Reply-To: <200212201047.27171.dev-pdf@smartology.nl> References: <200212201047.27171.dev-pdf@smartology.nl> Message-ID: <200212201057.43139.dev-pdf@smartology.nl> Oops ... Forgot to set locale correctly on the test PC. On Friday 20 December 2002 10:47, Remy C. Cool wrote: > According to the winAnsi encoding table, the Euro (¤) sign is > supported, but the generated pdf shows a ? sign. > > How can I get the euro sign in the pdf when I feed text from an xml > (unicode/iso8859-15) source? > > Regards, > Remy > > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users From reportlab-users@reportlab.com Fri Dec 20 10:40:32 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Fri, 20 Dec 2002 10:40:32 +0000 Subject: [reportlab-users] use euro symbol In-Reply-To: <200212201047.27171.dev-pdf@smartology.nl> References: <200212201047.27171.dev-pdf@smartology.nl> Message-ID: In article <200212201047.27171.dev-pdf@smartology.nl>, Remy C. Cool writes >According to the winAnsi encoding table, the Euro (€) sign is >supported, but the generated pdf shows a ? sign. > >How can I get the euro sign in the pdf when I feed text from an xml >(unicode/iso8859-15) source? > >Regards, >Remy > You might need to get modified font files. I'm looking on my machine at the result of running the StandardFonts demo I see the euro sign at decimal character 128. -- Robin Becker From reportlab-users@reportlab.com Fri Dec 20 14:24:44 2002 From: reportlab-users@reportlab.com (Martin =?iso-8859-1?Q?Sk=F8tt?=) Date: Fri, 20 Dec 2002 15:24:44 +0100 Subject: [reportlab-users] Placement of forms when using doForms()? In-Reply-To: References: <20021219161126.GA3502@martin> Message-ID: <20021220142444.GA1153@martin> On Thu, Dec 19, 2002 at 06:35:45PM -0000, Andy Robinson wrote: > > I'm placing pdf files as backgrounds on other pdf files by importing them > > into forms using pageCatcher.restoreForms and later on Canvas.doForm(). > > The problem is that the background is not placed exactly on the > > page, but a bit > > down and to the right. I have tried calling Canvas.translate(0,0) before > > doForm(), but it didn't help. Any suggestions on what I might do be doing > > wrong? > > You need non-zero values in Canvas.translate(..) or it > won't do anything :-) > Is the size of the original page you made into a form > the same size as the output page you are drawing? The size of both documents is A4 (according to Acrobat Reader at least). I have the same problem with sample2.pdf and sample3.pdf from the PageCatcher demo package on reportlab.com. -- Martin Skøtt Xenux ApS - The Linux People martin@xenux.dk From reportlab-users@reportlab.com Fri Dec 20 15:02:48 2002 From: reportlab-users@reportlab.com (Remy C. Cool) Date: Fri, 20 Dec 2002 16:02:48 +0100 Subject: [reportlab-users] use euro symbol In-Reply-To: References: <200212201047.27171.dev-pdf@smartology.nl> Message-ID: <200212201602.48202.dev-pdf@smartology.nl> That wasn't neccesary, the default fonts supported the Euro sign. All I had to do was to encode my unicode strings to cp1252 before filling the paragraph. My XML file was encoded with iso8859-15 and it has a different 'code' for the euro sign as cp1252 ... that was the reason it wasn't showing. On Friday 20 December 2002 11:40, Robin Becker wrote: > In article <200212201047.27171.dev-pdf@smartology.nl>, Remy C. Cool > writes > > >According to the winAnsi encoding table, the Euro (€) sign is > >supported, but the generated pdf shows a ? sign. > > > >How can I get the euro sign in the pdf when I feed text from an > > xml (unicode/iso8859-15) source? > > > >Regards, > >Remy > > You might need to get modified font files. I'm looking on my > machine at the result of running the StandardFonts demo I see the > euro sign at decimal character 128. From reportlab-users@reportlab.com Fri Dec 20 15:52:36 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 20 Dec 2002 15:52:36 -0000 Subject: [reportlab-users] Release 1.17 postponed In-Reply-To: <3DFB2C26.3C58396E@rasselstein-hoesch.de> Message-ID: Well, the week got complicated, and we had to choose between Christmas and Release 1.17. Christmas won; we're going down to the pub now :-) We'll try to do it in the next 2 weeks, exactly as planned before - get the patches in, then a freeze for a week for people to test out setup scripts, distutils etc. as they all hack on their brand new Christmas PCs. Whether it gets out on 31st or Jan 2/3 I do not know; but definitely before Monday 6th when all will be busy again :-) Best Regards, Andy Robinson From reportlab-users@reportlab.com Sun Dec 22 09:03:13 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Sun, 22 Dec 2002 09:03:13 -0000 Subject: [reportlab-users] RE: setup scripts In-Reply-To: Message-ID: Dirk, We checked in your patch. However lots of things now go weird for me on Windows. Could I ask someone to try this out ASAP and tell me: (a) does it correctly pick up and include data files? (e.g. reportlab/license.txt, reportlab/test/pythonpowered.gif')? (b) does it include (and, later build) _rl_accel and friends and do they work when imported? (c) if (b) worked, do they end up in site-packages or under reportlab/lib? These 3 things currently fail for me on Windows and I am worried there may be some platform difference in the way the top level translation ("reportlab" -> ".") is working. I can fix them for me but I fear this would just re-break them for other. Unfortunately Christmas travel schedules may hamper my testing on ??n?x... Thanks, Andy Robinson From reportlab-users@reportlab.com Sun Dec 22 11:25:10 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sun, 22 Dec 2002 12:25:10 +0100 Subject: [reportlab-users] RE: setup scripts References: Message-ID: <3E05A116.AAD878A2@rasselstein-hoesch.de> Andy, I did a 'cvs update' of latest code. I missed the MANIFEST.in . Have you added this to the cvs, or did I something wrong ? The bdist_rpm breaks without MANIFEST.in since the c-header files are not found. Regards, Dirk From reportlab-users@reportlab.com Sun Dec 22 12:10:09 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Sun, 22 Dec 2002 12:10:09 +0000 Subject: [reportlab-users] RE: setup scripts In-Reply-To: <3E05A116.AAD878A2@rasselstein-hoesch.de> References: <3E05A116.AAD878A2@rasselstein-hoesch.de> Message-ID: <8+0OYJAhuaB+Ewt3@jessikat.fsnet.co.uk> In article <3E05A116.AAD878A2@rasselstein-hoesch.de>, Dirk Datzert writes >Andy, > >I did a 'cvs update' of latest code. I missed the MANIFEST.in . Have you >added this to the cvs, or did I something wrong ? > >The bdist_rpm breaks without MANIFEST.in since the c-header files are >not found. > >Regards, >Dirk Sorry Dirk I forgot this. We're having problems to get the script going with win32. -- Robin Becker From reportlab-users@reportlab.com Sun Dec 22 13:00:31 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sun, 22 Dec 2002 14:00:31 +0100 Subject: [reportlab-users] RE: setup scripts References: <3E05A116.AAD878A2@rasselstein-hoesch.de> <8+0OYJAhuaB+Ewt3@jessikat.fsnet.co.uk> Message-ID: <3E05B76F.7B232F56@rasselstein-hoesch.de> Robin Becker schrieb: > Sorry Dirk I forgot this. We're having problems to get the script going > with win32. I've downloaded python 2.2 and distutils to test and modify the script. But how can I do it without the right c-compiler ? Have you a free c-compiler/linker for download ? With 'python sdist' the hyphen.mashed file in lib will not be found ? Regards, Dirk From reportlab-users@reportlab.com Sun Dec 22 13:13:00 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Sun, 22 Dec 2002 13:13:00 +0000 Subject: [reportlab-users] RE: setup scripts In-Reply-To: <3E05B76F.7B232F56@rasselstein-hoesch.de> References: <3E05A116.AAD878A2@rasselstein-hoesch.de> <8+0OYJAhuaB+Ewt3@jessikat.fsnet.co.uk> <3E05B76F.7B232F56@rasselstein-hoesch.de> Message-ID: <7vLfsKAcpbB+EwdV@jessikat.fsnet.co.uk> In article <3E05B76F.7B232F56@rasselstein-hoesch.de>, Dirk Datzert writes > > >Robin Becker schrieb: > >> Sorry Dirk I forgot this. We're having problems to get the script going >> with win32. > >I've downloaded python 2.2 and distutils to test and modify the script. >But how can I do it without the right c-compiler ? Have you a free >c-compiler/linker for download ? > >With 'python sdist' the hyphen.mashed file in lib will not be found ? > >Regards, >Dirk On Win32 we use VC++ 6.0, I have built everything with mingw, but that requires an extra bit of effort to get the python22.lib files etc. As for the .mashed file it presumably has to be treated as data. I've almost given up on trying to understand distutils. It kills me over and over. -- Robin Becker From reportlab-users@reportlab.com Sun Dec 22 14:05:10 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Sun, 22 Dec 2002 14:05:10 -0000 Subject: [reportlab-users] RE: setup scripts In-Reply-To: <3E05B76F.7B232F56@rasselstein-hoesch.de> Message-ID: I think the first thing is to confirm how it works for you on your platform. What we see is, none of the 'data' files get included in the build, even when we just do sdist. Either your package is wrong or (as I suspect) there is some serious difference in how distutils works on the platforms. So, can you confirm: with your build, do you see the GIF and font files in reportlab/test in the final installation? Thanks, Andy From reportlab-users@reportlab.com Sun Dec 22 15:50:14 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sun, 22 Dec 2002 16:50:14 +0100 Subject: [reportlab-users] RE: setup scripts References: Message-ID: <3E05DF36.6AFE64EF@rasselstein-hoesch.de> Dies ist eine mehrteilige Nachricht im MIME-Format. --------------1F2004A2F5F4CD624C5285ED Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Andy, please replace the MANIFEST.in with the attached one. I could build sdist on Linux (Python 2.1.3) and Win32 (Python 2.2.2). Do you need the *.dsp files on Win32 ? I think that *.xml & *.dtd files need to treat as data files as *.gif,*.png and *.jpegs. Regards, Dirk --------------1F2004A2F5F4CD624C5285ED Content-Type: text/plain; charset=us-ascii; name="MANIFEST.in" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="MANIFEST.in" recursive-include fonts * recursive-include docs * recursive-include lib *.c *.h *.in *.mashed recursive-include test *.gif include changes license.txt README global-exclude CVS/* --------------1F2004A2F5F4CD624C5285ED-- From reportlab-users@reportlab.com Sun Dec 22 16:34:57 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sun, 22 Dec 2002 17:34:57 +0100 Subject: [reportlab-users] RE: setup scripts References: Message-ID: <3E05E9B1.FDA240BC@rasselstein-hoesch.de> Dies ist eine mehrteilige Nachricht im MIME-Format. --------------E6A6F1BD890A6085BB9211A4 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Andy, I found a better version for MANIFEST.in. Please replace the MANIFEST.in with the attached one. I think that now all data_files are handled via MANIFEST.in well. I think that setup.py must changed again to handle all data_files. Regards, Dirk --------------E6A6F1BD890A6085BB9211A4 Content-Type: text/plain; charset=us-ascii; name="MANIFEST.in" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="MANIFEST.in" global-include *.dtd *.txt *.xml *.yml global-include *.c *.h *.in *.mashed global-include *.gif *.png *.jpg global-include *.AFM *.PFB include changes README --------------E6A6F1BD890A6085BB9211A4-- From reportlab-users@reportlab.com Sun Dec 22 17:31:38 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Sun, 22 Dec 2002 17:31:38 -0000 Subject: [reportlab-users] RE: setup scripts In-Reply-To: <3E05E9B1.FDA240BC@rasselstein-hoesch.de> Message-ID: > Hi Andy, > > I found a better version for MANIFEST.in. > Please replace the MANIFEST.in with the attached one. > > I think that now all data_files are handled via MANIFEST.in well. > I think that setup.py must changed again to handle all data_files. > OK, it's committed and now picking up all the data files! I will test further - then go and read the manuals about MANIFEST.in, which is clearly the key.... - Andy From reportlab-users@reportlab.com Sun Dec 22 17:45:20 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Sun, 22 Dec 2002 17:45:20 -0000 Subject: [reportlab-users] RE: setup scripts In-Reply-To: <3E05E9B1.FDA240BC@rasselstein-hoesch.de> Message-ID: Much better. The binary files are now getting into the source distribution. 2 issues still: 1. I still have to change ext_modules = [Extension( 'reportlab/lib/_rl_accel', to just ext_modules = [Extension( '_rl_accel', in order for it to create the extensions, otherwise the linker fails. We intend to create the .so or .pyd files in the site-packages directory, not in reportlab.lib, be default, so that _rl_accel still works. Does it work for you after this change? 2. Although the data files are included in the source distro, 'setup.py install' still fails to move them into the installed area. I guess we need them referred differently in setup.py Kids are back from a party, I will resume work in about 3 hours time...thanks for all the help! - Andy From reportlab-users@reportlab.com Sun Dec 22 18:48:53 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Sun, 22 Dec 2002 19:48:53 +0100 Subject: [reportlab-users] RE: setup scripts References: Message-ID: <3E060915.991E4EDD@rasselstein-hoesch.de> Dies ist eine mehrteilige Nachricht im MIME-Format. --------------FF1BE0173A79DEE8552B2B67 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Andy Robinson schrieb: > > Much better. The binary files are now getting into the source > distribution. 2 issues still: > > 1. I still have to change > ext_modules = [Extension( 'reportlab/lib/_rl_accel', > to just > ext_modules = [Extension( '_rl_accel', > in order for it to create the extensions, otherwise the linker > fails. We intend to create the .so or .pyd files in the > site-packages directory, not in reportlab.lib, be default, > so that _rl_accel still works. Does it work for you after > this change? Yes. Changed all ext_module/Extension places into site-packages now. > > 2. Although the data files are included in the source distro, > 'setup.py install' still fails to move them into the installed > area. I guess we need them referred differently in setup.py I thought of a setup-version for data_files which globs all data_files via pattern-matching, but that doesn't worked yet :-( > I attached my current versions of MANIFEST.in (since I forgot *.ttf!) and setup.py Regards, Dirk --------------FF1BE0173A79DEE8552B2B67 Content-Type: application/x-unknown-content-type-in_auto_file; name="MANIFEST.in" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="MANIFEST.in" Z2xvYmFsLWluY2x1ZGUgKi5kdGQgKi50eHQgKi54bWwgKi55bWwNCmdsb2JhbC1pbmNsdWRl ICouYyAqLmggKi5pbiAqLm1hc2hlZA0KZ2xvYmFsLWluY2x1ZGUgKi5naWYgKi5wbmcgKi5q cGcgLmE4NQ0KZ2xvYmFsLWluY2x1ZGUgKi5BRk0gKi5QRkIgKi50dGYNCmdsb2JhbC1pbmNs dWRlIFJFQURNRQ0KaW5jbHVkZSBjaGFuZ2VzDQo= --------------FF1BE0173A79DEE8552B2B67 Content-Type: application/x-unknown-content-type-py_auto_file; name="setup.py" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="setup.py" IyBhIGRhbmdlcm91c2x5IGluY29tcGxldGUgYXR0ZW1wdCBhdCBhIHJlcG9ydGxhYiBzZXR1 cCBzY3JpcHQsDQojIGRvIG5vdCB0cnVzdCBpdCB0byBkbyBhbnl0aGluZy4gIEl0IGJ1aWxk cyB0aGUgZXh0ZW5zaW9ucw0KIyB0aG91Z2ggOi0pDQoNCmZyb20gZGlzdHV0aWxzLmNvcmUg aW1wb3J0IHNldHVwLCBFeHRlbnNpb24NCg0KaW1wb3J0IG9zLCBzeXMsIGRpc3R1dGlscw0K DQojIGZyb20gWm9wZSAtIEFwcC5Db21tb24ucGFja2FnZV9ob21lDQoNCmRlZiBwYWNrYWdl X2hvbWUoZ2xvYmFsc19kaWN0KToNCiAgICBfX25hbWVfXz1nbG9iYWxzX2RpY3RbJ19fbmFt ZV9fJ10NCiAgICBtPXN5cy5tb2R1bGVzW19fbmFtZV9fXQ0KICAgIHI9b3MucGF0aC5zcGxp dChtLl9fcGF0aF9fWzBdKVswXQ0KICAgIHJldHVybiByDQoNCnBqb2luID0gb3MucGF0aC5q b2luDQoNCnBhY2thZ2VfcGF0aCA9IHBqb2luKHBhY2thZ2VfaG9tZShkaXN0dXRpbHMuX19k aWN0X18pLCAnc2l0ZS1wYWNrYWdlcycsICdyZXBvcnRsYWInKQ0KDQoNCiMgd2h5IG9oIHdo eSBkb24ndCBtb3N0IHNldHVwIHNjcmlwdHMgaGF2ZSBhIHNjcmlwdCBoYW5kbGVyPw0KIyBp ZiB5b3UgZG9uJ3QgaGF2ZSBvbmUsIHlvdSBjYW4ndCBlZGl0IGluIFB5dGhvbndpbg0KZGVm IHJ1bigpOg0KICAgIExJQlMgPSBbXQ0KICAgIHNldHVwKA0KICAgICAgICAgICAgbmFtZT0i UmVwb3J0bGFiIiwNCiAgICAgICAgICAgIHZlcnNpb249IjEuMTciLA0KICAgICAgICAgICAg bGljZW5jZT0iQlNEIGxpY2Vuc2UsIENvcHlyaWdodCAoYykgMjAwMC0yMDAzLCBSZXBvcnRM YWIgSW5jLiIsDQogICAgICAgICAgICBkZXNjcmlwdGlvbj0iUmVwb3J0bGFiIFBERiBnZW5l cmF0aW9uIHRvb2xzIiwNCiAgICAgICAgICAgIGxvbmdfZGVzY3JpcHRpb249IiIiVGhlIFJl cG9ydExhYiBQREYgR2VuZXJhdGlvbiB0b29scy4NCkFuIE9wZW4gU291cmNlIFB5dGhvbiBs aWJyYXJ5IGZvciBnZW5lcmF0aW5nIFBERnMuDQoNClRoaXMgaW5zdGFsbGVyIGNyZWF0ZWQg dXNpbmcgZGlzdHV0aWxzIGJ5IEpvaG4gUHJlY2Vkby4NCiIiIiwNCg0KICAgICAgICAgICAg YXV0aG9yPSJUaGUgYm95cyBmcm9tIFNXMTkiLA0KICAgICAgICAgICAgYXV0aG9yX2VtYWls PSJpbmZvQHJlcG9ydGxhYi5jb20iLA0KICAgICAgICAgICAgdXJsPSJodHRwOi8vd3d3LnJl cG9ydGxhYi5jb20vIiwNCg0KICAgICAgICAgICAgcGFja2FnZV9kaXIgPSB7J3JlcG9ydGxh Yic6ICcuJ30sDQoNCiAgICAgICAgICAgIHBhY2thZ2VzPVsgIyBpbmNsdWRlIGFueXRoaW5n IHdpdGggYW4gX19pbml0X18NCiAgICAgICAgICAgICAgICAgICAgJ3JlcG9ydGxhYicsDQog ICAgICAgICAgICAgICAgICAgICdyZXBvcnRsYWIuZGVtb3MnLA0KICAgICAgICAgICAgICAg ICAgICAncmVwb3J0bGFiLmRlbW9zLmNvbG9ycycsDQogICAgICAgICAgICAgICAgICAgICdy ZXBvcnRsYWIuZGVtb3MuZ2FkZmx5cGFwZXInLA0KICAgICAgICAgICAgICAgICAgICAncmVw b3J0bGFiLmRlbW9zLm9keXNzZXknLA0KICAgICAgICAgICAgICAgICAgICAncmVwb3J0bGFi LmRlbW9zLnJsem9wZScsDQogICAgICAgICAgICAgICAgICAgICdyZXBvcnRsYWIuZGVtb3Mu c3RkZm9udHMnLA0KICAgICAgICAgICAgICAgICAgICAncmVwb3J0bGFiLmRlbW9zLnRlc3Rz JywNCiAgICAgICAgICAgICAgICAgICAgJ3JlcG9ydGxhYi5kb2NzJywNCiAgICAgICAgICAg ICAgICAgICAgJ3JlcG9ydGxhYi5kb2NzLmdyYXBoZ3VpZGUnLA0KICAgICAgICAgICAgICAg ICAgICAncmVwb3J0bGFiLmRvY3MucmVmZXJlbmNlJywNCiAgICAgICAgICAgICAgICAgICAg J3JlcG9ydGxhYi5kb2NzLnVzZXJndWlkZScsDQogICAgICAgICAgICAgICAgICAgICdyZXBv cnRsYWIuZ3JhcGhpY3MnLA0KICAgICAgICAgICAgICAgICAgICAncmVwb3J0bGFiLmdyYXBo aWNzLmNoYXJ0cycsDQogICAgICAgICAgICAgICAgICAgICdyZXBvcnRsYWIuZ3JhcGhpY3Mu d2lkZ2V0cycsDQogICAgICAgICAgICAgICAgICAgICdyZXBvcnRsYWIubGliJywNCiAgICAg ICAgICAgICAgICAgICAgJ3JlcG9ydGxhYi5wZGZiYXNlJywNCiAgICAgICAgICAgICAgICAg ICAgJ3JlcG9ydGxhYi5wZGZnZW4nLA0KICAgICAgICAgICAgICAgICAgICAncmVwb3J0bGFi LnBsYXR5cHVzJywNCiAgICAgICAgICAgICAgICAgICAgJ3JlcG9ydGxhYi50ZXN0JywNCiAg ICAgICAgICAgICAgICAgICAgJ3JlcG9ydGxhYi50b29scycsDQogICAgICAgICAgICAgICAg ICAgICdyZXBvcnRsYWIudG9vbHMuZG9jY28nLA0KICAgICAgICAgICAgICAgICAgICAncmVw b3J0bGFiLnRvb2xzLnB5MnBkZicsDQogICAgICAgICAgICAgICAgICAgICdyZXBvcnRsYWIu dG9vbHMucHl0aG9ucG9pbnQnLA0KICAgICAgICAgICAgICAgICAgICAncmVwb3J0bGFiLnRv b2xzLnB5dGhvbnBvaW50LmRlbW9zJywNCiAgICAgICAgICAgICAgICAgICAgJ3JlcG9ydGxh Yi50b29scy5weXRob25wb2ludC5zdHlsZXMnLA0KICAgICAgICAgICAgICAgICAgICAgXSwN CiAgICAgICAgICAgICAgZGF0YV9maWxlcyA9IFsocGpvaW4ocGFja2FnZV9wYXRoLCAnZG9j cycsICdpbWFnZXMnKSwNCgkJCQlbJ2RvY3MvaW1hZ2VzL0VkaXRfUHJlZnMuZ2lmJywNCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkb2NzL2ltYWdlcy9QeXRob25fMjEu Z2lmJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkb2NzL2ltYWdlcy9Q eXRob25fMjFfSElOVC5naWYnLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg J2RvY3MvaW1hZ2VzL2ZpbGVFeGNoYW5nZS5naWYnLA0KICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJ2RvY3MvaW1hZ2VzL2pwbi5naWYnLA0KICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJ2RvY3MvaW1hZ2VzL2pwbmNoYXJzLmpwZycsDQogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAnZG9jcy9pbWFnZXMvbGo4MTAwLmpwZycsDQogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZG9jcy9pbWFnZXMvcmVwbG9nby5hODUn LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2RvY3MvaW1hZ2VzL3JlcGxv Z28uZ2lmJ10pLA0KCQkJICAgIChwam9pbihwYWNrYWdlX3BhdGgsICdmb250cycpLCANCgkJ CQlbJ2ZvbnRzL0xlRVJDX19fLkFGTScsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAnZm9udHMvTGVFUkNfX18uUEZCJywNCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICdmb250cy9sdXhpc2VyaWYudHRmJywNCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICdmb250cy9sdXhpc2VyaWZfbGljZW5zZS50eHQnLA0KICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJ2ZvbnRzL3JpbmEudHRmJywNCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICdmb250cy9yaW5hX2xpY2Vuc2UudHh0J10pLA0KCQkJICAg IChwYWNrYWdlX3BhdGgsDQoJCQkJWydSRUFETUUnLA0KCQkJCSAnY2hhbmdlcycsDQoJCQkJ ICdsaWNlbnNlLnR4dCddKSwNCgkJCSAgICAocGpvaW4ocGFja2FnZV9wYXRoLCAndGVzdCcp LA0KCQkJCVsndGVzdC9weXRob25wb3dlcmVkLmdpZicsXSksDQoJCQkgICAgKHBqb2luKHBh Y2thZ2VfcGF0aCwgJ2xpYicpLA0KCQkJCVsnbGliL2h5cGhlbi5tYXNoZWQnLF0pLA0KCQkJ XSwNCg0KICAgICAgICAgICAgZXh0X21vZHVsZXMgPSAgIFtFeHRlbnNpb24oICdfcmxfYWNj ZWwnLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsnbGliL19y bF9hY2NlbC5jJ10sDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg aW5jbHVkZV9kaXJzPVtdLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGRlZmluZV9tYWNyb3M9W10sDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbGlicmFyeV9kaXJzPVtdLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGxpYnJhcmllcz1MSUJTLCAjIGxpYnJhcmllcyB0byBsaW5rIGFnYWlu c3QNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLA0KICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBFeHRlbnNpb24oICdzZ21sb3AnLA0KICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsnbGliL3NnbWxvcC5jJ10sDQogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5jbHVkZV9kaXJzPVtdLA0K ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmluZV9tYWNyb3M9 W10sDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlicmFyeV9k aXJzPVtdLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpYnJh cmllcz1MSUJTLCAjIGxpYnJhcmllcyB0byBsaW5rIGFnYWluc3QNCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICApLA0KICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBFeHRlbnNpb24oICdweUhuaicsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgWydsaWIvcHlIbmptb2R1bGUuYycsDQogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICdsaWIvaHlwaGVuLmMnLA0KICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAnbGliL2huamFsbG9jLmMnXSwNCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmNsdWRlX2RpcnM9W10sDQogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmaW5lX21hY3Jvcz1bXSwN CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5X2RpcnM9 W10sDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlicmFyaWVz PUxJQlMsICMgbGlicmFyaWVzIHRvIGxpbmsgYWdhaW5zdA0KICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAg XSwNCg0KICAgICAgICApDQoNCmlmIF9fbmFtZV9fPT0nX19tYWluX18nOg0KICAgIHJ1bigp DQo= --------------FF1BE0173A79DEE8552B2B67-- From reportlab-users@reportlab.com Sun Dec 22 23:20:50 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Sun, 22 Dec 2002 23:20:50 -0000 Subject: [reportlab-users] RE: setup scripts In-Reply-To: <3E060915.991E4EDD@rasselstein-hoesch.de> Message-ID: After some more work, "python setup.py sdist" creates an archive OK, and "python setup.py install" does a correct install from it AFAICT - all test suite passed and all the readmes and examples I can find. On win32 anyway. Testers take note: please rename/remove your old reportlab before testing the install, and look carefully in the created one for things like reportlab/license.txt reportlab/test/pythonpowered.gif I also begin to comprehend the utter weirdness of distutils: 1. 'sdist' uses a neat manifest-builder manifest to just bundle up everything, ignoring any data file declarations in the setup script. 2. 'install' uses the 'data' declarations in the setup script, ignoring any manifest 3. bdist_wininst must do something else altogether as it still isn't picking up the data files.... Maintaining this by hand is going to suck. At the very minimum we will need to check in a manifest and have a runtime test to verify all required files are actually there in all the distros. Victory never tasted so sour grumble grumble grumble..... - Andy From reportlab-users@reportlab.com Mon Dec 23 12:04:49 2002 From: reportlab-users@reportlab.com (Dirk Datzert) Date: Mon, 23 Dec 2002 13:04:49 +0100 Subject: [reportlab-users] RE: setup scripts References: Message-ID: <000a01c2aa7b$7e2357e0$3e28011c@rag2> This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C2AA83.DFBE8D00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Andy, I wrote a little function for searching the data_files via pattern = matching of the file extensions. It steps recursive thru to directories = and puts all data-files per directory into a tuple useable by data_file = in setup(). Regards, Dirk ----- Original Message -----=20 From: "Andy Robinson" To: Sent: Monday, December 23, 2002 12:20 AM Subject: RE: [reportlab-users] RE: setup scripts > After some more work, "python setup.py sdist" creates an=20 > archive OK, and "python setup.py install" does a correct=20 > install from it AFAICT - all test suite passed and all the=20 > readmes and examples I can find. On win32 anyway. >=20 > Testers take note: please rename/remove your old > reportlab before testing the install, and look carefully > in the created one for things like=20 > reportlab/license.txt > reportlab/test/pythonpowered.gif >=20 > I also begin to comprehend the utter weirdness of distutils: > 1. 'sdist' uses a neat manifest-builder manifest to just bundle=20 > up everything, ignoring any data file declarations in the > setup script. > =20 > 2. 'install' uses the 'data' declarations in the setup script, > ignoring any manifest >=20 > 3. bdist_wininst must do something else altogether as > it still isn't picking up the data files.... >=20 > Maintaining this by hand is going to suck. At the very=20 > minimum we will need to check in a manifest and have a=20 > runtime test to verify all required files are actually=20 > there in all the distros. >=20 > Victory never tasted so sour grumble grumble grumble..... >=20 > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users >=20 ------=_NextPart_000_0008_01C2AA83.DFBE8D00 Content-Type: application/octet-stream; name="setup.py" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="setup.py" # a dangerously incomplete attempt at a reportlab setup script, # do not trust it to do anything. It builds the extensions # though :-) from distutils.core import setup, Extension import os, glob, sys, string, distutils # from Zope - App.Common.package_home def package_home(globals_dict): __name__=3Dglobals_dict['__name__'] m=3Dsys.modules[__name__] r=3Dos.path.split(m.__path__[0])[0] return r pjoin =3D os.path.join pwalk =3D os.path.walk psplit =3D string.split package_path =3D pjoin(package_home(distutils.__dict__), = 'site-packages', 'reportlab') # treat this extensions as data_files: pattern =3D ['gif','jpg','png','xml','yml','dtd','txt','a85'] data_files_found =3D [] def file_check ( arg, dirname, fnames ): data_files =3D [] other_files =3D [] for fname in fnames: ext =3D psplit(fname, '.')[-1] if ext in pattern: data_files.append (pjoin(dirname, fname)) else: other_files.append(fname) # replace the remaining files names via slice fnames[:] =3D other_files # append an entry for all data_files in this dirname if len(data_files) > 0: data_files_found.append( (pjoin(package_path, dirname), = data_files ) ) def search_data_files(): pwalk('.', file_check, None) return data_files_found # why oh why don't most setup scripts have a script handler? # if you don't have one, you can't edit in Pythonwin def run(): LIBS =3D [] setup( name=3D"Reportlab", version=3D"1.17", licence=3D"BSD license, Copyright (c) 2000-2003, ReportLab = Inc.", description=3D"Reportlab PDF generation tools", long_description=3D"""The ReportLab PDF Generation tools. An Open Source Python library for generating PDFs. This installer created using distutils by John Precedo. """, author=3D"The boys from SW19", author_email=3D"info@reportlab.com", url=3D"http://www.reportlab.com/", package_dir =3D {'reportlab': '.'}, packages=3D[ # include anything with an __init__ 'reportlab', 'reportlab.demos', 'reportlab.demos.colors', 'reportlab.demos.gadflypaper', 'reportlab.demos.odyssey', 'reportlab.demos.rlzope', 'reportlab.demos.stdfonts', 'reportlab.demos.tests', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', 'reportlab.test', 'reportlab.tools', 'reportlab.tools.docco', 'reportlab.tools.py2pdf', 'reportlab.tools.pythonpoint', 'reportlab.tools.pythonpoint.demos', 'reportlab.tools.pythonpoint.styles', ], data_files =3D [(package_path, ['README', 'changes']), (pjoin(package_path, 'lib'), ['lib/hyphen.mashed',]), ] + search_data_files(), ext_modules =3D [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=3D[], define_macros=3D[], library_dirs=3D[], libraries=3DLIBS, # libraries to = link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=3D[], define_macros=3D[], library_dirs=3D[], libraries=3DLIBS, # libraries to = link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=3D[], define_macros=3D[], library_dirs=3D[], libraries=3DLIBS, # libraries to = link against ), ], ) if __name__=3D=3D'__main__': run() ------=_NextPart_000_0008_01C2AA83.DFBE8D00-- From reportlab-users@reportlab.com Thu Dec 26 16:00:24 2002 From: reportlab-users@reportlab.com (Robert Krieg) Date: Thu, 26 Dec 2002 08:00:24 -0800 Subject: [reportlab-users] dynamic format handling accomplished Message-ID: <38FC1F2515BFFD4E904B82A1C2A047B89BFA89@oak2kmail.stcg.net> From reportlab-users@reportlab.com Mon Dec 23 21:33:13 2002 From: reportlab-users@reportlab.com (reportlab-users@reportlab.com) Date: Mon, 23 Dec 2002 16:33:13 -0500 Subject: [reportlab-users] ChangingDocumentLayoutToLandscape Message-ID: PEZPTlQgZmFjZT0iRGVmYXVsdCBTYW5zIFNlcmlmLCBWZXJkYW5hLCBBcmlhbCwgSGVsdmV0aWNh LCBzYW5zLXNlcmlmIiBzaXplPTI+PERJVj5EZWFyIFNpcnMsPC9ESVY+PERJVj4mbmJzcDs8L0RJ Vj48RElWPkhvcGUgYWxsIGlzIHdlbGwuPC9ESVY+PERJVj4mbmJzcDs8L0RJVj48RElWPkkgaGF2 ZSBqdXN0IHN0YXJ0ZWQgdXNpbmcgdGhlIFJNTCBmcm9tIFJlcG9ydGxhYi48L0RJVj48RElWPiZu YnNwOzwvRElWPjxESVY+R3JlYXQgcHJvZHVjdCwgYW5kIGdyZWF0IGlkZWFzIGltcGxlbWVudGVk IGZvciB0aGUgaW1wb3J0YW50IGNhdXNlLjwvRElWPjxESVY+Jm5ic3A7PC9ESVY+PERJVj5JZiB5 b3UgY291bGQgcGxlYXNlLCBleHBsYWluIHRoZSBwcm9wZXIgd2F5IHRvIHNldCB0aGUgbGF5b3V0 IG9mICZsdDtzdG9yeSZndDsgYW5kICZsdDtwYWdlRHJhd2luZyZndDsgdHlwZSBQREYgcmVwb3J0 cyB0byBMYW5kc2NhcGUuPC9ESVY+PERJVj4mbmJzcDs8L0RJVj48RElWPkl0IGlzIHRoZSBjYXNl LCBmb3IgdGhlIGluZHVzdHJpYWwgcmVwb3J0aW5nIHRvIHVzZSBMYW5kc2NhcGUgb3ZlciBQb3J0 cmFpdCwgaXQgaXMgdXJnZW50IHRoYXQgSSBoYXZlIHRvIGZpbmQgdGhlIHNvbHV0aW9uIHRvIHRo aXMuPC9ESVY+PERJVj4mbmJzcDs8L0RJVj48RElWPlRoYW5rcyBpbiBhZHZhbmNlLjxCUj48L0RJ Vj48RElWPktpbmQmbmJzcDtSZWdhcmRzLDxCUj48QlI+TC4mbmJzcDtTb2xkYXR0PEJSPlNvZnR3 YXJlJm5ic3A7Rm9yY2VzLCZuYnNwO05ZQzxCUj50LjcxOC41NDQuNzQwMCMzNTE8QlI+PC9ESVY+ PC9GT05UPg== From reportlab-users@reportlab.com Thu Dec 26 18:35:16 2002 From: reportlab-users@reportlab.com (Philip Douglass) Date: Thu, 26 Dec 2002 13:35:16 -0500 Subject: [reportlab-users] How to draw text in a non-rectangular area? Message-ID: <00d301c2ad0d$8972fdf0$40512bcf@sirs.com> I've scanned the docs and FAQ and couldn't find out if there was an easy way to flow text into a non-square frame. For example, I have a long string that I would like to format into a triangle. How can I do this? From reportlab-users@reportlab.com Fri Dec 27 08:17:36 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 27 Dec 2002 08:17:36 -0000 Subject: [reportlab-users] How to draw text in a non-rectangular area? In-Reply-To: <00d301c2ad0d$8972fdf0$40512bcf@sirs.com> Message-ID: Philip, We don't have anything to do this at present, you'd have to 'roll your own' container. Also, normally you have to join our users list first, otherwise posts get held pending review. http://two.pairlist.net/mailman/listinfo/reportlab-users - Andy Robinson > -----Original Message----- > From: reportlab-users-admin@reportlab.com > [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Philip Douglass > Sent: 26 December 2002 18:35 > To: reportlab-users@reportlab.com > Subject: [reportlab-users] How to draw text in a non-rectangular area? > > > I've scanned the docs and FAQ and couldn't find out if there was an easy > way to flow text into a non-square frame. For example, I have a long > string that I would like to format into a triangle. How can I do this? > > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users From reportlab-users@reportlab.com Fri Dec 27 08:20:20 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 27 Dec 2002 08:20:20 -0000 Subject: [reportlab-users] ChangingDocumentLayoutToLandscape In-Reply-To: Message-ID: This has been fixed since the last release and will be in release 1.17 due within a few days. I'll send a patch by private email. You can now set pageSize to a pair of numbers on either the main template or each individual page template. Here I set the template called 'main' to landscape A4 simply by putting in 595,842 instead of 842,595 etc. Please send Glenn my regards :-) Best regards, Andy Robinson p.s. please sign up to the users list or your email will be blocked pending review by an administrator. http://two.pairlist.net/mailman/listinfo/reportlab-users From reportlab-users@reportlab.com Fri Dec 27 10:06:17 2002 From: reportlab-users@reportlab.com (daniel meier) Date: Fri, 27 Dec 2002 11:06:17 +0100 Subject: [reportlab-users] some tiny things Message-ID: <001701c2ad8f$ac025dc0$0ceae6c2@eau> hi there I'm playing around with reportlab and I'm quite impressed. But I have these following questions. 1.) I generate a pdf dynamically, but i would like to add an existing pdf in at the top and an other one at the bottom of the reportlab-pdf. is this possible? 2.) is it possible to import eps-grafics. kind regards daniel From reportlab-users@reportlab.com Fri Dec 27 14:37:55 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Fri, 27 Dec 2002 14:37:55 -0000 Subject: [reportlab-users] some tiny things In-Reply-To: <001701c2ad8f$ac025dc0$0ceae6c2@eau> Message-ID: > hi there > > I'm playing around with reportlab and I'm quite impressed. > But I have these > following questions. > > 1.) I generate a pdf dynamically, but i would like to add > an existing pdf in > at the top and an > other one at the bottom of the reportlab-pdf. is this possible? This uses our commercial product, PageCatcher. It lets you use existing PDFs asd a background. See the 'products' section of our web site. > > 2.) is it possible to import eps-grafics. Not in the Open Source package. But you can use Acrobat to distill your EPS file into a PDF file, and then use PageCatcher to include that in a PDF document you generate. The intent is that with PageCatcher, you can create any backgrounds and artwork you need and include it in a Python script. And a secondary intent is that people pay us for this, as we need some way to fund the Open Source development ;-) Best Regards, Andy Robinson From reportlab-users@reportlab.com Fri Dec 27 16:57:00 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Fri, 27 Dec 2002 17:57:00 +0100 Subject: [reportlab-users] some tiny things In-Reply-To: <001701c2ad8f$ac025dc0$0ceae6c2@eau> Message-ID: <378A3178-19BC-11D7-B673-00039345C610@darwin.in-berlin.de> daniel meier wrote: > 1.) I generate a pdf dynamically, but i would like to add an existing > pdf in > at the top and an > other one at the bottom of the reportlab-pdf. is this possible? If you're adventurous enough try pdf2svg (OpenSource) with my svglib to include PDF pages in your documents: http://www.solidcode.net/backup/pdf2svg http://www.reportlab.com/extensions.html Regards, Dinu -- Dinu C. Gherman ...................................................................... "Experience is one thing you can't get for nothing." (Oscar Wilde) From reportlab-users@reportlab.com Fri Dec 27 21:34:44 2002 From: reportlab-users@reportlab.com (Philip Douglass) Date: Fri, 27 Dec 2002 16:34:44 -0500 Subject: [reportlab-users] How to draw text in a non-rectangular area? References: Message-ID: <019101c2adef$c6918610$40512bcf@sirs.com> Actually I did join the list -- I just used a plussed version of my address. Anyway, here is a test program that demonstrates the best I could come up with off the top of my head (please excuse me, I'm not the most skilled programmer, and I am a brand new python user). This still doesn't really help with justifying text or anything like that. Has anyone else tried to do what I'm trying to do? Is there a better way to accomplish this? # File: point_in_frame_test.py # Coordinates for an irregular frame, in inches # Note: Must be clockwise coordinates! frame = [( 1.8125, 3.5000 ), ( 6.6875, 3.5000 ), ( 6.6875, 2.8125 ), ( 5.6875, 1.8125 ), ( 2.8125, 1.8125 ), ( 1.8125, 2.8125 )] points = [( 0.8125, 3.5000 ), # x=outside, y=top border (false) ( 2.8125, 2.8125 ), # x=inside, y=inside (true) ( 2.8125, 1.8125 ), # on bottom left corner (false) ( 7.6875, 0.8125 )] # x=outside, y=outside (false) def areaOfTriangle(pointset): """Returns the area for a given set of three points.""" (x0, y0), (x1, y1), (x2,y2) = pointset area=(.5)*(x1*y2 - y1*x2 - x0*y2 + y0*x2 + x0*y1 - y0*x1) return area def isInside(frame, point): """Returns true if the given frame contains the given point.""" for i in range(2, len(frame)+1): pointset = frame[i-2:i] pointset.append(point) a = areaOfTriangle(pointset) if a >= 0: return False return True for point in points: if isInside(frame, point): print "Yes, point ", point, " is inside frame." else: print " No, point ", point, " is not inside frame." ## END: point_in_frame_test.py ----- Original Message ----- From: "Andy Robinson" To: ; Sent: Friday, December 27, 2002 3:17 AM Subject: RE: [reportlab-users] How to draw text in a non-rectangular area? Philip, We don't have anything to do this at present, you'd have to 'roll your own' container. Also, normally you have to join our users list first, otherwise posts get held pending review. http://two.pairlist.net/mailman/listinfo/reportlab-users - Andy Robinson > -----Original Message----- > From: reportlab-users-admin@reportlab.com > [mailto:reportlab-users-admin@reportlab.com]On Behalf Of Philip Douglass > Sent: 26 December 2002 18:35 > To: reportlab-users@reportlab.com > Subject: [reportlab-users] How to draw text in a non-rectangular area? > > > I've scanned the docs and FAQ and couldn't find out if there was an easy > way to flow text into a non-square frame. For example, I have a long > string that I would like to format into a triangle. How can I do this? > > _______________________________________________ > reportlab-users mailing list > reportlab-users@reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users _______________________________________________ reportlab-users mailing list reportlab-users@reportlab.com http://two.pairlist.net/mailman/listinfo/reportlab-users From reportlab-users@reportlab.com Sun Dec 29 16:51:03 2002 From: reportlab-users@reportlab.com (Joel A. Walberg) Date: Sun, 29 Dec 2002 11:51:03 -0500 Subject: [reportlab-users] Standard graphics: (85w x 32h pixels) Message-ID: <200212291151.03710.joelbert@digital51.com> I'm working on building a site using reportlab and would like to credit i= t. =20 However, I have been unable to find any logos that are about this size. Are there any? ------------------------- Joel A. Walberg joelbert@digital51.com From reportlab-users@reportlab.com Sun Dec 29 16:54:38 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Sun, 29 Dec 2002 16:54:38 +0000 Subject: [reportlab-users] Standard graphics: (85w x 32h pixels) In-Reply-To: <200212291151.03710.joelbert@digital51.com> References: <200212291151.03710.joelbert@digital51.com> Message-ID: In article <200212291151.03710.joelbert@digital51.com>, Joel A. Walberg writes >I'm working on building a site using reportlab and would like to credit it. >However, I have been unable to find any logos that are about this size. > >Are there any? #The official RL Logo can be drawn using this script from reportlab.lib.corp import RL_CorpLogo from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin class RL_Logo(_DrawingEditorMixin,Drawing): def __init__(self,width=400,height=200,*args,**kw): apply(Drawing.__init__,(self,width,height)+args,kw) self.height = 32 self.width = 85 self._add(self,RL_CorpLogo(),name='L',validate=None,desc=None) self.L.height = 32 self.L.width = 85 if __name__=="__main__": #NORUNTESTS RL_Logo().save(formats=['gif'],outDir='.',fnRoot=None) >------------------------- >Joel A. Walberg >joelbert@digital51.com >_______________________________________________ >reportlab-users mailing list >reportlab-users@reportlab.com >http://two.pairlist.net/mailman/listinfo/reportlab-users -- Robin Becker From reportlab-users@reportlab.com Sun Dec 29 18:39:16 2002 From: reportlab-users@reportlab.com (Dinu Gherman) Date: Sun, 29 Dec 2002 19:39:16 +0100 Subject: [reportlab-users] Standard graphics: (85w x 32h pixels) In-Reply-To: Message-ID: Robin Becker: > class RL_Logo(_DrawingEditorMixin,Drawing): > [...] Surely there must be a good reason for the Mixin, isn't it? ;-) In the past is was not needed... Dinu -- Dinu C. Gherman ...................................................................... "I want to put a ding in the universe." (Steve Jobs) From reportlab-users@reportlab.com Sun Dec 29 19:30:17 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Sun, 29 Dec 2002 19:30:17 +0000 Subject: [reportlab-users] Standard graphics: (85w x 32h pixels) In-Reply-To: References: Message-ID: In article , Dinu Gherman writes >Robin Becker: > >> class RL_Logo(_DrawingEditorMixin,Drawing): >> [...] > >Surely there must be a good reason for the Mixin, isn't it? ;-) >In the past is was not needed... > >Dinu > >-- >Dinu C. Gherman >...................................................................... >"I want to put a ding in the universe." (Steve Jobs) it just comes from the guieditor thing. A place to hang hooks at present only the _add method. -- Robin Becker From reportlab-users@reportlab.com Sun Dec 29 23:54:22 2002 From: reportlab-users@reportlab.com (Andy Robinson) Date: Sun, 29 Dec 2002 23:54:22 -0000 Subject: [reportlab-users] Standard graphics: (85w x 32h pixels) In-Reply-To: Message-ID: > > >> class RL_Logo(_DrawingEditorMixin,Drawing): > >> [...] > > > >Surely there must be a good reason for the Mixin, isn't it? ;-) > >In the past is was not needed... > > > it just comes from the guieditor thing. A place to hang hooks at present > only the _add method. That needs some explanation. The code Robin posted was generated by our visual drawing editor, which is currently commercial code, and which needs some extra hooks in the drawing. It should nevertheless be runnable. What matters is the property assignments. However, our logo has a default size of 130x86 so you may need to place it within a larger rectangle or it will look kind of distorted... Thanks, Andy From reportlab-users@reportlab.com Mon Dec 30 22:25:52 2002 From: reportlab-users@reportlab.com (Dennis Allison) Date: Mon, 30 Dec 2002 14:25:52 -0800 Subject: [reportlab-users] PyRXP Message-ID: <200212302225.OAA06855@sumeru.stanford.EDU> PyRXP is an amazing system -0- I have noticed one problem, not really a bug, but it is the irritation of the moment... ... parsed with the "ReturnComments" flag set does not return the comment between the and the initial xml tag. I suspect that this is not really legal xml to use comments in this way, but most tools seem to accept it without a problem. Unfortunately, I have a set of users who discovered this "works" and have been using it. Now, with a system upgrade, things fail. From reportlab-users@reportlab.com Mon Dec 30 22:59:57 2002 From: reportlab-users@reportlab.com (Robin Becker) Date: Mon, 30 Dec 2002 22:59:57 +0000 Subject: [reportlab-users] PyRXP In-Reply-To: <200212302225.OAA06855@sumeru.stanford.EDU> References: <200212302225.OAA06855@sumeru.stanford.EDU> Message-ID: In article <200212302225.OAA06855@sumeru.stanford.EDU>, Dennis Allison writes >PyRXP is an amazing system -0- > >I have noticed one problem, not really a bug, but it is the irritation of the >moment... > > > > > ... > >parsed with the "ReturnComments" flag set does not return the comment >between the and the initial xml tag. > >I suspect that this is not really legal xml to use comments in this way, >but most tools seem to accept it without a problem. Unfortunately, I have >a set of users who discovered this "works" and have been using it. Now, with >a system upgrade, things fail. uurrrk, I guess I have to look at the parser which is not my thing really :( -- Robin Becker