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 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 paapUtrecht, 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:-----Original Message-----Great!
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
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 paapUtrecht, The = Netherlands
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 objectdef 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
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
Œ & \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 xxx; 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œ
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 tis '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 yEverything 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=20wrote: > 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,
------_=_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:
Marc StoberI 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._x0Any 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: Flowablewith 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