From andy at reportlab.com Wed Oct 1 05:30:05 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 1 Oct 2008 10:30:05 +0100 Subject: [reportlab-users] Pie chart updates In-Reply-To: References: <956003ae0809302344o11e32af9p583b3d7793c57ab@mail.gmail.com> Message-ID: <956003ae0810010230g4f7b612bgcce0151c25d374b2@mail.gmail.com> 2008/10/1 Amanda Berry : > Thanks for the charts Andy. These work but I felt that perhaps they could be > a little more subtle. To that end I have attached a pdf showing a selection > of ten colours for your consideration. Great! Thanks. Is it likely you'll be able to do the updated autumn cover before 12:00? We're hoping to do a test run for everyone around lunchtime. - Andy From marcel_reportlab at tromp.org Wed Oct 1 12:59:58 2008 From: marcel_reportlab at tromp.org (Marcel Tromp) Date: Wed, 01 Oct 2008 09:59:58 -0700 Subject: [reportlab-users] svg rendering and groups Message-ID: <48E3AC8E.1050605@tromp.org> Hi, I am using to render a drawing that is build of groups of groups. Rendering to pdf works fine. Rendering to svg causes offsets to picture elements that were build as a group. Is this a known problem? Any workarounds? I need both translations and rotates, so building the drawing in a single group will be difficult. Regards, Marcel -- From gherman at darwin.in-berlin.de Thu Oct 2 04:19:37 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Thu, 2 Oct 2008 10:19:37 +0200 Subject: [reportlab-users] pyPdf on launchpad.net Message-ID: Hi, I'm sure there are enough pyPdf users on this list to justify this short posting. Yesterday I discovered that the code is hosted on launchpad.net [1] which is a nice move. And surely enough, I've already filed a little bug report. ;-) Regards, Dinu [1] https://launchpad.net/pypdf From gherman at darwin.in-berlin.de Thu Oct 2 04:41:26 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Thu, 2 Oct 2008 10:41:26 +0200 Subject: [reportlab-users] svg rendering and groups In-Reply-To: <48E3AC8E.1050605@tromp.org> References: <48E3AC8E.1050605@tromp.org> Message-ID: <78159F19-3C1D-4862-AF84-9C4973295AA7@darwin.in-berlin.de> Marcel Tromp: > I am using to render a drawing that is build of groups of groups. > Rendering to pdf works fine. Rendering to svg causes offsets to > picture > elements that were build as a group. > > Is this a known problem? Any workarounds? > > I need both translations and rotates, so building the drawing in a > single group will be difficult. I was involved in writing ReportLab's renderSVG module (Robin, correct me, if I'm wrong), but I am no longer and I don't know how much RL supports or even uses this code nowadays. What I suggest is that you create a couple of test cases and run roundtrip tests (SVG->PDF->SVG and PDF->SVG->PDF) using renderSVG and my svglib package [1] in order to get some more concrete ideas about what is actually going wrong. Regards, Dinu [1] http://pypi.python.org/pypi/svglib/0.6.0 From andy at reportlab.com Thu Oct 2 06:22:26 2008 From: andy at reportlab.com (Andy Robinson) Date: Thu, 2 Oct 2008 11:22:26 +0100 Subject: [reportlab-users] svg rendering and groups In-Reply-To: <78159F19-3C1D-4862-AF84-9C4973295AA7@darwin.in-berlin.de> References: <48E3AC8E.1050605@tromp.org> <78159F19-3C1D-4862-AF84-9C4973295AA7@darwin.in-berlin.de> Message-ID: <956003ae0810020322hfcf878aw4bfe0092f3f06809@mail.gmail.com> 2008/10/2 Dinu Gherman : > I was involved in writing ReportLab's renderSVG module (Robin, > correct me, if I'm wrong), but I am no longer and I don't know > how much RL supports or even uses this code nowadays. Nobody here actually looks closely at the output. We'd welcome both specific error messages and patches; I can be certain they won't break any RL applications as we don't use SVG at all. - Andy From dirk.holtwick at gmail.com Sat Oct 4 10:08:54 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Sat, 04 Oct 2008 16:08:54 +0200 Subject: [reportlab-users]   in paragraph Message-ID: <48E778F6.3010601@gmail.com> Hi, for my project pisa I create the paragraph fragments directly. Until version 2.1 of RL I used a non breaking space placeholder like u"\u00a0" and it worked fine. Since 2.2 this one seems to be considered a normal whitespace and therefore removed. Any hints how I can define a fragment with just nothing in it and the length of a space character? Cheers Dirk From stephane at harobed.org Sat Oct 4 18:20:40 2008 From: stephane at harobed.org (=?iso-8859-1?q?KLEIN_St=E9phane?=) Date: Sat, 4 Oct 2008 22:20:40 +0000 (UTC) Subject: [reportlab-users] Am I allowed to implement feature like pageCatcher.copyPages in ReportLab Toolkit ? Message-ID: Hi, I look for implement a feature like pageCatcher.copyPages in ReportLab library. I wonder if it's forbidden ? Why this question ? because this feature conflict with commercial PageCatcher feature. About implementation, I've read PyPDF (http://pybrary.net/pyPdf/) source code and I understand I need to implement read capability in PDFDictionnary... like PyPDF Dictionnary and other basic object. I need implement also something like pyPDF.PdfFileReader. Thanks for your information, Stephane From marcel_reportlab at tromp.org Sun Oct 5 04:13:54 2008 From: marcel_reportlab at tromp.org (Marcel Tromp) Date: Sun, 05 Oct 2008 01:13:54 -0700 Subject: [reportlab-users] svg rendering and groups In-Reply-To: <956003ae0810020322hfcf878aw4bfe0092f3f06809@mail.gmail.com> References: <48E3AC8E.1050605@tromp.org> <78159F19-3C1D-4862-AF84-9C4973295AA7@darwin.in-berlin.de> <956003ae0810020322hfcf878aw4bfe0092f3f06809@mail.gmail.com> Message-ID: <48E87742.4040105@tromp.org> Problem is that renderSVG assumes additive transforms while RL assumes absolute transforms for groups in groups. The patch below solves the problem. It surpresses transforms for group elements. Marcel -- --- renderSVG.py 2008-10-04 22:37:44.791828000 -0700 +++ /lib/python2.5/site-packages/reportlab/graphics/renderSVG.py 2008-06-30 20:47:27.069418000 -0700 @@ -661,19 +661,10 @@ node2 = childNode.provideNode() else: node2 = childNode - if isinstance(node2, Group) == False: - self.drawNode(node2) + self.drawNode(node2) self._canvas.transform(a, b, c, d, e, f) self._canvas.endGroup(currGroup) - for childNode in group.getContents(): - if isinstance(childNode, UserNode): - node2 = childNode.provideNode() - else: - node2 = childNode - if isinstance(node2, Group): - self.drawNode(node2) - if self.verbose: print "### end _SVGRenderer.drawGroup" Andy Robinson wrote: > 2008/10/2 Dinu Gherman : >> I was involved in writing ReportLab's renderSVG module (Robin, >> correct me, if I'm wrong), but I am no longer and I don't know >> how much RL supports or even uses this code nowadays. > > Nobody here actually looks closely at the output. > > We'd welcome both specific error messages and patches; I can be > certain they won't break any RL applications as we don't use SVG > at all. > > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users From andy at reportlab.com Sun Oct 5 18:11:19 2008 From: andy at reportlab.com (Andy Robinson) Date: Sun, 5 Oct 2008 23:11:19 +0100 Subject: [reportlab-users] Am I allowed to implement feature like pageCatcher.copyPages in ReportLab Toolkit ? In-Reply-To: References: Message-ID: <956003ae0810051511l5d545e59r2284ab373ea95d65@mail.gmail.com> 2008/10/4 KLEIN St?phane : > Hi > > I look for implement a feature like pageCatcher.copyPages in ReportLab > library. I wonder if it's forbidden ? Why this question ? because this > feature conflict with commercial PageCatcher feature. It's not "forbidden". Our library is open source and you can make any changes to it that you want, for yourself. When we first started out, parsing PDF was very hard work and we didn't want to make it too easy for (commercial) competitors, so we made this feature as closed-source code. Now that PDF-parsing code is reasonably available (e.g. in pyPDF), there is no longer any 'secret'. With very limited time ourselves, and because we already have this capability within our own product suite, ReportLab employees can't spend weeks helping to write such a feature. But if someone (you?) contributed a well thought-out and integrated and correct set of extensions to our library to parse PDFs, we'd certainly consider accepting it and we'd help check things and make suggestions. Best Regards, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From andy at reportlab.com Mon Oct 6 07:50:47 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 6 Oct 2008 12:50:47 +0100 Subject: [reportlab-users]   in paragraph In-Reply-To: <48E778F6.3010601@gmail.com> References: <48E778F6.3010601@gmail.com> Message-ID: <956003ae0810060450m39d20d74pb6e15b9e92e97ff3@mail.gmail.com> 2008/10/4 Dirk Holtwick : > Hi, > > for my project pisa I create the paragraph > fragments directly. Until version 2.1 of RL I used a non breaking space > placeholder like u"\u00a0" and it worked fine. Since 2.2 this one seems to > be considered a normal whitespace and therefore removed. Any hints how I can > define a fragment with just nothing in it and the length of a space > character? This sounds like a bug. I have logged it in our tracker (issue 679, and hopefully the tracker will be visible by midweek); Robin's back from vacation now and will hopefully be able to look at it this week before we do 2.2.1. - Andy From dirk.holtwick at gmail.com Mon Oct 6 08:09:47 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Mon, 06 Oct 2008 14:09:47 +0200 Subject: [reportlab-users]   in paragraph In-Reply-To: <956003ae0810060450m39d20d74pb6e15b9e92e97ff3@mail.gmail.com> References: <48E778F6.3010601@gmail.com> <956003ae0810060450m39d20d74pb6e15b9e92e97ff3@mail.gmail.com> Message-ID: <48EA000B.4080204@gmail.com> Thanks, ... an issue tracker? Sound very promising :) Andy spoke about a Wiki some time ago. This would be a great place for some FAQ and Cookbook like examples. Very good to see that there will be improvements in the infrastructure for the toolkit. Dirk Andy Robinson schrieb: > 2008/10/4 Dirk Holtwick : >> Hi, >> >> for my project pisa I create the paragraph >> fragments directly. Until version 2.1 of RL I used a non breaking space >> placeholder like u"\u00a0" and it worked fine. Since 2.2 this one seems to >> be considered a normal whitespace and therefore removed. Any hints how I can >> define a fragment with just nothing in it and the length of a space >> character? > > This sounds like a bug. I have logged it in our tracker (issue 679, > and hopefully the tracker will be visible by midweek); Robin's back > from vacation now and will hopefully be able to look at it this week > before we do 2.2.1. > > > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users From pdg66 at hotmail.com Tue Oct 7 04:01:45 2008 From: pdg66 at hotmail.com (Paul Graham) Date: Tue, 7 Oct 2008 08:01:45 +0000 Subject: [reportlab-users] Control list of Flowables flow direction within a table cell? Message-ID: Hi guys, I'm a reportlab newbie - can anyone please tell me if there's a way of getting a list of flowables (within a table cell) to flow from left to right (eg. display an image to the left of a paragraph) - all the examples I've seen go from top to bottom. Thanks in advance for any responses Paul Graham _________________________________________________________________ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Tue Oct 7 04:08:22 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 7 Oct 2008 09:08:22 +0100 Subject: [reportlab-users] Control list of Flowables flow direction within a table cell? In-Reply-To: References: Message-ID: <956003ae0810070108n337f1f4dt2ce475aaae373126@mail.gmail.com> 2008/10/7 Paul Graham : > Hi guys, I'm a reportlab newbie - can anyone please tell me if there's a way > of getting a list of flowables (within a table cell) to flow from left to > right (eg. display an image to the left of a paragraph) - all the examples > I've seen go from top to bottom. Flowables are "block level" and all go from top to bottom. However, there is a fairly clunky ImageAndFlowables object which can be used to wrap text around and under an image, if that's what you want to do. The quickest way to understand this is to look at the example in test_002_paras here....just 'page down' until you hit an image. This is a test suite for the commercial RML product built on Platypus, but the underlying flowable objects are pretty much what you would expect from looking at the RML tags http://developer.reportlab.com/examples/ Hope this helps, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From gherman at darwin.in-berlin.de Wed Oct 8 05:08:31 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Wed, 8 Oct 2008 11:08:31 +0200 Subject: [reportlab-users] Am I allowed to implement feature like pageCatcher.copyPages in ReportLab Toolkit ? In-Reply-To: References: Message-ID: KLEIN St?phane: > I look for implement a feature like pageCatcher.copyPages in ReportLab > library. I wonder if it's forbidden ? Why this question ? because this > feature conflict with commercial PageCatcher feature. > > About implementation, I've read PyPDF (http://pybrary.net/pyPdf/) > source > code and I understand I need to implement read capability in > PDFDictionnary... like PyPDF Dictionnary and other basic object. I > need > implement also something like pyPDF.PdfFileReader. Funny question. I'm pretty sure some people on this list have written their own PageCatcher-like modules. I think all of it could be more or less simply replaced with something else, and it surely is an interesting challenge. In fact, I'm doing it partly for my own projects, here's a quick example (also based on pyPdf) of some randomly layouted pages: http://tinyurl.com/4cp3wp which takes only a few lines of code, once you have the approp- riate flowable installed: [...] srcPath = "diagradoc.pdf" destPath = "diagradoc6rand.pdf" imgWidth = 4*cm miniSize = (imgWidth, imgWidth*1.4142) canv = Canvas(destPath, pagesize=PAGESIZE) for i in range(6): pp = PdfPage(srcPath, i, destPath, destSize=miniSize) x = random.random() * (PAGESIZE[0] - imgWidth) y = random.random() * (PAGESIZE[1] - imgWidth*1.4142) pp.drawOn(canv, x, y) canv.showPage() canv.save() The nice thing, of course, is that it is a flowable which can be used with Platypus. I have already posted an example of this some time ago on this list. In practice different projects have different needs and it's un- likely somebody will come up with the grand unified solution. Maybe this is the reason why, historically, PageCatcher has a rather strange mix of functionality. Regards, Dinu From alet at librelogiciel.com Wed Oct 8 15:34:55 2008 From: alet at librelogiciel.com (alet at librelogiciel.com) Date: Wed, 8 Oct 2008 21:34:55 +0200 Subject: [reportlab-users] [JOB OFFER] urgent RL + Zope + Plone small project Message-ID: <20081008193455.GA22450@vazy.pykota.com> Hi there, I was proposed to do the following work, but I can't because of lack of time, so I refused but told the asking people I'd try to find someone to do it... I'm looking urgently for someone (consultant or company ?) with the following capabilities : - Good knowledge of ReportLab (http://www.reportlab.org) and Zope integration (http://www.zope.org). - Good knowledge of the Plone (v2.x) CMS (http://www.plone.org). - If possible, french speaking. - Able to accept payments coming from French Universities (you'll be paid but the delay can be up to two months). This is mandatory. - Enough available time to finish the (relatively small) coding project before November 10th 2008 (it's short !) This project involves the uploading of PDF documents with the use of Plone workflows, with a team of moderators and a larger team of submitters, with accounts being created online. These documents can receive comments and can be rated. You'll also have to generate PDF documents on the fly from Zope or CGI (nothing complex, probably a single image on a single page and some text and a table). Available/required tools : Apache, Zope (2.x), Plone 2.x, PostgreSQL 7.x or 8.x, Python, possibly ssh. Please contact me privately for more details : I'll send you the name, email address and phone number of the person to contact, along with a short description of what the project is about. bye Jerome Alet From arkadi at smartbit.be Thu Oct 9 08:55:46 2008 From: arkadi at smartbit.be (Arkadi Colson) Date: Thu, 09 Oct 2008 14:55:46 +0200 Subject: [reportlab-users] minimal row height Message-ID: <48EDFF52.1000908@smartbit.be> Hi guys, Is there a way in reportlab to make use of minimal row heights? If all cells in a row are empty, the minimal row height should be applied to the row and if the paragraph in one cell needs more then one line, the row height will be calculated automatically and grow. Thanks in advance, Arkadi Colson From ralsina at netmanagers.com.ar Thu Oct 9 12:37:26 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Thu, 9 Oct 2008 13:37:26 -0300 Subject: [reportlab-users] [BUG] possible bug in transtition code Message-ID: <200810091337.27095.ralsina@netmanagers.com.ar> I am trying to expose transitions in rst2pdf, and I got this error when calling with a wrong transition effect name: I am fixing it so I don't trigger it anymore, but the error is wrong ;-) File "/usr/lib/python2.5/site-packages/reportlab/pdfgen/canvas.py", line 1474, in setPageTransition raise PDFError('Unknown Effect Name "%s"' % effectname) NameError: global name 'PDFError' is not defined -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan From robin at reportlab.com Thu Oct 9 12:52:39 2008 From: robin at reportlab.com (Robin Becker) Date: Thu, 09 Oct 2008 17:52:39 +0100 Subject: [reportlab-users] [BUG] possible bug in transtition code In-Reply-To: <200810091337.27095.ralsina@netmanagers.com.ar> References: <200810091337.27095.ralsina@netmanagers.com.ar> Message-ID: <48EE36D7.5010202@chamonix.reportlab.co.uk> Roberto Alsina wrote: > I am trying to expose transitions in rst2pdf, and I got this error when > calling with a wrong transition effect name: > > I am fixing it so I don't trigger it anymore, but the error is wrong ;-) > > File "/usr/lib/python2.5/site-packages/reportlab/pdfgen/canvas.py", line 1474, > in setPageTransition > raise PDFError('Unknown Effect Name "%s"' % effectname) > NameError: global name 'PDFError' is not defined > That's definitely a bug. I'll fix it today. I was trying to fix some obsolete usages and forgot an import. -- Robin Becker From henning.vonbargen at arcor.de Thu Oct 9 13:06:38 2008 From: henning.vonbargen at arcor.de (Henning von Bargen) Date: Thu, 9 Oct 2008 19:06:38 +0200 Subject: [reportlab-users] fixing bugs in 2.2 / Hyphenation support References: <13161370.1220650022283.JavaMail.ngmail@webmail18.arcor-online.net> <20081006093251.GA32574@Clio.twb.ath.cx> Message-ID: Trent, obviously your message didn't make it into the ReportLab users mailing list. I waited a few days to see if it appears there and maybe someone from the ReportLab staff answers, but since this was not the case: ----- Original Message ----- From: "Trent W. Buck" To: Cc: Sent: Monday, October 06, 2008 11:32 AM Subject: Re: [reportlab-users] fixing bugs in 2.2 / Hyphenation support > On Fri, Sep 05, 2008 at 11:27:02PM +0200, henning.vonbargen at arcor.de > wrote: >> It was difficult for me to create a minimal invasive integration of >> the wordaxe hyphenation library into ReportLab. The best solution I >> could think of still required a minimal change to rl_codecs.py. >> >> ==> It would help a lot if my version of rl_codecs.py could make >> it into the RL repository. I can hardly imagine how this could >> break existing code, but who knows... This should be reviewed by ? >> the RL people. > > This fix has not been integrated into reportlab 2.2. Is there a > reportlab issue tracker (BTS) that I can use to monitor the status of > this bug? I could not find any mention of such a thing on > reportlab.org or www.reportlab.com. No, there isn't. However, ReportLab has recently announced that there will be one soon (whatever that means). > > As the soon-to-be Debian maintainer wordaxe, I have configured the > wordaxe package to automatically replace (cleanly, via diversions) > reportlab's misbehaving rl_codecs.py with wordaxe's version. Does this mean Debian is to include wordaxe in their distribution? Cool! > > Attached is a diff between the rl_codecs.py files in RL 2.2 and > Wordaxe 0.2.6, to demonstrate to lurking reportlab developers just how > minimal this patch is. Sorry, but there wasn't any attachment in your message. Henning From ralsina at netmanagers.com.ar Thu Oct 9 13:49:34 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Thu, 9 Oct 2008 14:49:34 -0300 Subject: [reportlab-users] Problem with transitions Message-ID: <200810091449.35215.ralsina@netmanagers.com.ar> I am running into a problem when trying to do page transitions: The fist one works, the rest do nothing. I wrote a self-contained test progrm: http://python.pastebin.com/m657a2e8a -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan From ralsina at netmanagers.com.ar Thu Oct 9 13:53:23 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Thu, 9 Oct 2008 14:53:23 -0300 Subject: [reportlab-users] Problem with transitions In-Reply-To: <200810091449.35215.ralsina@netmanagers.com.ar> References: <200810091449.35215.ralsina@netmanagers.com.ar> Message-ID: <200810091453.31165.ralsina@netmanagers.com.ar> On Thursday 09 October 2008 14:49:34 Roberto Alsina wrote: > I am running into a problem when trying to do page transitions: The fist > one works, the rest do nothing. > > I wrote a self-contained test progrm: http://python.pastebin.com/m657a2e8a Forget it, it works. -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan From andy at reportlab.com Thu Oct 9 15:56:01 2008 From: andy at reportlab.com (Andy Robinson) Date: Thu, 9 Oct 2008 20:56:01 +0100 Subject: [reportlab-users] fixing bugs in 2.2 / Hyphenation support In-Reply-To: References: <13161370.1220650022283.JavaMail.ngmail@webmail18.arcor-online.net> <20081006093251.GA32574@Clio.twb.ath.cx> Message-ID: <956003ae0810091256l5d8e5cc6q2673dd2e9cf82e9b@mail.gmail.com> 2008/10/9 Henning von Bargen : > Trent, > > obviously your message didn't make it into the ReportLab users mailing list. > >> This fix has not been integrated into reportlab 2.2. Is there a >> reportlab issue tracker (BTS) that I can use to monitor the status of >> this bug? I could not find any mention of such a thing on >> reportlab.org or www.reportlab.com. > > No, there isn't. However, ReportLab has recently announced that there > will be one soon (whatever that means). Thanks, Henning. It's logged now, and sorry if we missed it earlier. We are testing the public parts of the tracker now, and trying to make sure our descriptions of present issues are accurate and readable. It won't be anything awesome but will at least present a list of issues. I hope it will be visible next week. - Andy -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From yroman-reportlab at altalang.com Fri Oct 10 18:52:16 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Fri, 10 Oct 2008 18:52:16 -0400 Subject: [reportlab-users] Disable TTF Embedding Message-ID: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com> This is probably the opposite than most people want, but I'm trying to stop ReportLab from embedding TTF fonts, such as Arial. When I create a PDF via Acrobat, it lists this under "Fonts": - Arial-BoldItalicMT Type: TrueType Encoding: Ansi Actual Font: Arial-BoldItalicMT Actual Font Type: TrueType - Arial-BoldMT Type: TrueType Encoding: Ansi Actual Font: Arial-BoldMT Actual Font Type: TrueType ... With ReportLab, I get this: - Arial-BoldItalicMT (Embedded Subset) Type: TrueType Encoding: Built-in - Arial-BoldMT (Embedded Subset) Type: TrueType Encoding: Built-in ... I'm registering these like so: from reportlab.pdfbase.pdfmetrics import registerFont from reportlab.pdfbase.ttfonts import TTFont registerFont(TTFont('Arial', 'arial.ttf')) Any ideas? Thanks, -- Yoann Roman From pmattingly at mail.csuchico.edu Sat Oct 11 22:09:20 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Sat, 11 Oct 2008 19:09:20 -0700 Subject: [reportlab-users] Bulleted Text not displaying Message-ID: Code: pdf = SimpleDocTemplate("learn_platypus.pdf", pagesize = letter, title="Somebody", author="Somebody", showBoundary = 0, #debugging, set to 1 ) body_style = ParagraphStyle( name = "body_style", fontSize = 12, wordWrap = True,#THIS DOES NOT REPORT ERRORS ON BAD INPUTS #Does this even work? fontName = "Times-Roman" ) text = "This is bulleted text." para = Paragraph(text, style=body_style) story.append(para) pdf.build(story) I'd really like to be able to display bulleted text, but ReportLab isn't cooperating. Other things I've tried that didn't work: text = "This is bulleted text." #displays no bullet, but the text works text = "\xe2\x80\xa2This is bulleted text." #displays a bullet CHARACTER then the text, not what I'm after para = Paragraph("", style=body_style, bulletText="This is bulleted text.") #displays nothing para = Paragraph("\xe2\x80\xa2", style=body_style, bulletText="This is bulleted text.") #Bullet character AFTER the bullet text This is the last thing I need to get working before I can finish my programming. Thanks for your help. Always such a headache to program OSS things, would it kill anyone to make the documentation complete? =*( -------------- next part -------------- An HTML attachment was scrubbed... URL: From ing.miguel.angel at gmail.com Sun Oct 12 15:42:01 2008 From: ing.miguel.angel at gmail.com (Miguel Angel) Date: Sun, 12 Oct 2008 14:42:01 -0500 Subject: [reportlab-users] Reportlab + Python + RHEL 4 = Traceback (most recent call last) Message-ID: Hi, first of all, I would like to apologize for my english. I have a linux box with RHEL 4 and: - python-reportlab-1.20-1.rf - python-2.3.4-14 - python-devel-2.3.4-14 But when I run my code, show me this: [root at ibes dev]# python2.3 mydev.py Traceback (most recent call last): File "mydev.py", line 110, in ? c.construirPdf() File "mydev.py", line 46, in construirPdf c.drawString(85,634, u"BOGOT?") File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/canvas.py", line 1169, in drawString t.textLine(text) File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/textobject.py", line 334, in textLine self._code.append('%s T*' % self._formatText(text)) File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/textobject.py", line 306, in _formatText text = self._canvas._escape(text) File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/canvas.py", line 231, in _escape return _escapePDF(s) File "/usr/lib/python2.3/site-packages/reportlab/pdfbase/pdfutils.py", line 139, in _escape return join(map(lambda c, d=_ESCAPEDICT: d[c],s),'') File "/usr/lib/python2.3/site-packages/reportlab/pdfbase/pdfutils.py", line 139, in return join(map(lambda c, d=_ESCAPEDICT: d[c],s),'') KeyError: u'\xc1' What is the problem? Thanks, any help would be greatly appreciated. -- Atentamente, Miguel Angel Moreno Bola?os Usuario Linux registrado No. 391784 http://counter.li.org "El amor es un dolor entre pecho y espalda, que sabe a papas fritas sin salsa de tomate!" Att: Nous From pmattingly at mail.csuchico.edu Sun Oct 12 17:13:58 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Sun, 12 Oct 2008 14:13:58 -0700 Subject: [reportlab-users] Reportlab + Python + RHEL 4 = Traceback (most recent call last) In-Reply-To: References: Message-ID: Can we see your code? On Sun, Oct 12, 2008 at 12:42 PM, Miguel Angel wrote: > Hi, first of all, I would like to apologize for my english. > > I have a linux box with RHEL 4 and: > - python-reportlab-1.20-1.rf > - python-2.3.4-14 > - python-devel-2.3.4-14 > > But when I run my code, show me this: > > [root at ibes dev]# python2.3 mydev.py > Traceback (most recent call last): > File "mydev.py", line 110, in ? > c.construirPdf() > File "mydev.py", line 46, in construirPdf > c.drawString(85,634, u"BOGOT?") > File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/canvas.py", > line 1169, in drawString > t.textLine(text) > File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/textobject.py", > line 334, in textLine > self._code.append('%s T*' % self._formatText(text)) > File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/textobject.py", > line 306, in _formatText > text = self._canvas._escape(text) > File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/canvas.py", > line 231, in _escape > return _escapePDF(s) > File "/usr/lib/python2.3/site-packages/reportlab/pdfbase/pdfutils.py", > line 139, in _escape > return join(map(lambda c, d=_ESCAPEDICT: d[c],s),'') > File "/usr/lib/python2.3/site-packages/reportlab/pdfbase/pdfutils.py", > line 139, in > return join(map(lambda c, d=_ESCAPEDICT: d[c],s),'') > KeyError: u'\xc1' > > What is the problem? > > Thanks, any help would be greatly appreciated. > > > -- > Atentamente, > > > Miguel Angel Moreno Bola?os > > Usuario Linux registrado No. 391784 > http://counter.li.org > > "El amor es un dolor entre pecho y espalda, > que sabe a papas fritas sin salsa de tomate!" > > Att: Nous > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ing.miguel.angel at gmail.com Sun Oct 12 17:34:35 2008 From: ing.miguel.angel at gmail.com (Miguel Angel) Date: Sun, 12 Oct 2008 16:34:35 -0500 Subject: [reportlab-users] Reportlab + Python + RHEL 4 = Traceback (most recent call last) In-Reply-To: References: Message-ID: yes ... --------------------------------- #!/usr/bin/python # -*- coding: utf8 -* import sys import string import os import time from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import letter class FacturaPdf: def construirPdf(self): archivoIn = open(str(sys.argv[-1])) datos = archivoIn.read() miTimeStamp = time.time() # Realizamos un parseo simple por lineas lista = string.split( datos, '\n' ) print lista[-1] # Toma el archivo y le agrega el nombre pertinente tipo_documentos = ["ORIGINAL","COPIA 1","COPIA 2"] for doc in tipo_documentos: if len(sys.argv)==2: nombre = doc+" "+".".join(sys.argv[-1].split(".")[:1]+["pdf"]) else: nombre = doc+" exro.pdf" nombre = nombre.replace(" ","_") c = canvas.Canvas(nombre, pagesize=letter) # INSERTANDO DATOS EN EL AREA D c.setFont("Helvetica", 8) # Cliente #c.drawString(85,678, lista[5]) c.drawString(85,678, "Nombre el cliente") # NIT. Va una copia mas abajo c.drawString(85,661, "8600017786") # Direccion c.drawString(85,648, "CR 126 A 17 50") # Ciudad c.drawString(85,634, u"BOGOT?") # Telefono c.drawString(85,620, u"tel?fono") # OC c.drawString(85,604, "OC------") # Remision c.drawString(280,604, "8929") # Factura Numero c.drawString(510,634, "000000000000") # Fecha Factura c.drawString(510,620, "09/17/2008") # Fecha Vencimiento c.drawString(510,604, "10/17/2008") # INSERTANDO DATOS EN EL AREA C # Generando un time stamp # INSERTANDO DATOS EN EL AREA D # Valor Venta c.drawString(526,320, "11857500.00") # Valor Subtotal c.drawString(526,293, "11857500.00") # Observacion c.drawString(45,304, "Abstenerse de efectuar Reteiva") # IVA c.drawString(526,277, "1897200.00") # Total c.drawString(526,263, "13754700.00") # Son 1 c.drawString(55,249, lista[31]) # Son 2 c.drawString(55,241, lista[32]) #valor="* TRECE MILLONES SETECIENTOS CINCUENTA Y CUATRO MIL SETECIENTOS PESOS CON 00/100 M/CTE" # Parsea la linea y la divide #valor.split(" ") #valor.split(" ")[2] #c.drawString(55,249, valor.split(" ")[2]) # Otro tratamiento #c.drawString(55,249, valor[:76]) #c.drawString(55,241, "* "+valor[76:]) # Cliente inferior c.drawString(451,148, "INDUSTRIAS IVOR CASA INGLESA") # NIT inferior c.drawString(451,138, "8600017786") # Aqui se generan los tres Pdf: ORIGINAL, COPIA 1, COPIA 2 c.drawString(60,50, doc) c.showPage() c.save() self.unirPdfs(nombre) def unirPdfs(self,nombre): comando = "pdftk "+nombre+" background watermark.pdf output final_"+nombre print comando os.system(comando) c = FacturaPdf() c.construirPdf() --------------------------------------------- On Sun, Oct 12, 2008 at 4:13 PM, Peter Mattingly wrote: > Can we see your code? > > On Sun, Oct 12, 2008 at 12:42 PM, Miguel Angel > wrote: >> >> Hi, first of all, I would like to apologize for my english. >> >> I have a linux box with RHEL 4 and: >> - python-reportlab-1.20-1.rf >> - python-2.3.4-14 >> - python-devel-2.3.4-14 >> >> But when I run my code, show me this: >> >> [root at ibes dev]# python2.3 mydev.py >> Traceback (most recent call last): >> File "mydev.py", line 110, in ? >> c.construirPdf() >> File "mydev.py", line 46, in construirPdf >> c.drawString(85,634, u"BOGOT?") >> File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/canvas.py", >> line 1169, in drawString >> t.textLine(text) >> File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/textobject.py", >> line 334, in textLine >> self._code.append('%s T*' % self._formatText(text)) >> File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/textobject.py", >> line 306, in _formatText >> text = self._canvas._escape(text) >> File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/canvas.py", >> line 231, in _escape >> return _escapePDF(s) >> File "/usr/lib/python2.3/site-packages/reportlab/pdfbase/pdfutils.py", >> line 139, in _escape >> return join(map(lambda c, d=_ESCAPEDICT: d[c],s),'') >> File "/usr/lib/python2.3/site-packages/reportlab/pdfbase/pdfutils.py", >> line 139, in >> return join(map(lambda c, d=_ESCAPEDICT: d[c],s),'') >> KeyError: u'\xc1' >> >> What is the problem? >> >> Thanks, any help would be greatly appreciated. >> >> >> -- >> Atentamente, >> >> >> Miguel Angel Moreno Bola?os >> >> Usuario Linux registrado No. 391784 >> http://counter.li.org >> >> "El amor es un dolor entre pecho y espalda, >> que sabe a papas fritas sin salsa de tomate!" >> >> Att: Nous >> _______________________________________________ >> reportlab-users mailing list >> reportlab-users at reportlab.com >> http://two.pairlist.net/mailman/listinfo/reportlab-users > > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > > -- Atentamente, Miguel Angel Moreno Bola?os Usuario Linux registrado No. 391784 http://counter.li.org "El amor es un dolor entre pecho y espalda, que sabe a papas fritas sin salsa de tomate!" Att: Nous From H.vonBargen at t-p.com Mon Oct 13 02:05:05 2008 From: H.vonBargen at t-p.com (Henning von Bargen) Date: Mon, 13 Oct 2008 08:05:05 +0200 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: Message-ID: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> > From: "Peter Mattingly" > Subject: [reportlab-users] Bulleted Text not displaying > To: reportlab-users at reportlab.com > > Code: > pdf = SimpleDocTemplate("learn_platypus.pdf", > pagesize = letter, > title="Somebody", > author="Somebody", > showBoundary = 0, #debugging, set to 1 > ) > > body_style = ParagraphStyle( > name = "body_style", > fontSize = 12, > wordWrap = True,#THIS DOES NOT REPORT ERRORS ON BAD INPUTS > #Does this even work? > fontName = "Times-Roman" > ) > text = "This is bulleted text." > para = Paragraph(text, style=body_style) > story.append(para) > > pdf.build(story) > > I'd really like to be able to display bulleted text, but > ReportLab isn't > cooperating. Other things I've tried that didn't work: > > text = "This is bulleted text." #displays no > bullet, but > the text works > text = "\xe2\x80\xa2This is bulleted text." #displays a > bullet CHARACTER > then the text, not what I'm after > para = Paragraph("", style=body_style, bulletText="This is > bulleted text.") > #displays nothing > para = Paragraph("\xe2\x80\xa2", style=body_style, bulletText="This is > bulleted text.") #Bullet character AFTER the bullet text > > This is the last thing I need to get working before I can finish my > programming. > > Thanks for your help. The optional argument bulletText is not the content of your paragraph, but the bullet itself. For example, try para = Paragraph("Blah Blah Blubberfasel Blah", bulletText="a)", style=body_style) or para = Paragraph("This is bulleted text.", style=body_style, bulletText="\xe2\x80\xa2") Hint: Don't just read the documentation, also look at the tests folder (unfortunately not included in the Windows installer). Henning From andy at reportlab.com Mon Oct 13 02:13:03 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 13 Oct 2008 07:13:03 +0100 Subject: [reportlab-users] Reportlab + Python + RHEL 4 = Traceback (most recent call last) In-Reply-To: References: Message-ID: <956003ae0810122313n4b8fb2c6m9f06904bab621d14@mail.gmail.com> 2008/10/12 Miguel Angel : > Hi, first of all, I would like to apologize for my english. > > I have a linux box with RHEL 4 and: > - python-reportlab-1.20-1.rf > KeyError: u'\xc1' > > What is the problem? I am not sure of the exact bug, but you are using a very old (pre-Unicode) version of ReportLab and trying to work with unicode strings. You should upgrade to 2.2, as the 1.x versions simply did not support Unicode properly. Best Regards, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From pmattingly at mail.csuchico.edu Mon Oct 13 15:11:47 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 12:11:47 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> Message-ID: Wow, I don't think I would have ever figured out that particular quirk. ATTN DEV: Violates rule of least surprise. Hint: Don't just read the documentation, also look at the tests folder (unfortunately not included in the Windows installer). I did. I guess I just wasn't lucky enough to stumble across where this was covered. The optional argument bulletText is not the content of your paragraph, > but the bullet itself. > For example, try > para = Paragraph("Blah Blah Blubberfasel Blah", bulletText="a)", > style=body_style) > or > para = Paragraph("This is bulleted text.", style=body_style, > bulletText="\xe2\x80\xa2") > > Hint: Don't just read the documentation, also look at the tests folder > (unfortunately not included in the Windows installer). > > Henning > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmattingly at mail.csuchico.edu Mon Oct 13 15:23:32 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 12:23:32 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> Message-ID: For fans of the XML approach this works for that application: text = "\xe2\x80\xa2This is bulleted text." para = Paragraph(text, style=body_style) story.append(para) I got the bullet character from the documentation; Who knows where they got that, I certainly can't find any reference that that code / format when I google it. On Sun, Oct 12, 2008 at 11:05 PM, Henning von Bargen wrote: > > From: "Peter Mattingly" > > Subject: [reportlab-users] Bulleted Text not displaying > > To: reportlab-users at reportlab.com > > > > Code: > > pdf = SimpleDocTemplate("learn_platypus.pdf", > > pagesize = letter, > > title="Somebody", > > author="Somebody", > > showBoundary = 0, #debugging, set to 1 > > ) > > > > body_style = ParagraphStyle( > > name = "body_style", > > fontSize = 12, > > wordWrap = True,#THIS DOES NOT REPORT ERRORS ON BAD INPUTS > > #Does this even work? > > fontName = "Times-Roman" > > ) > > text = "This is bulleted text." > > para = Paragraph(text, style=body_style) > > story.append(para) > > > > pdf.build(story) > > > > I'd really like to be able to display bulleted text, but > > ReportLab isn't > > cooperating. Other things I've tried that didn't work: > > > > text = "This is bulleted text." #displays no > > bullet, but > > the text works > > text = "\xe2\x80\xa2This is bulleted text." #displays a > > bullet CHARACTER > > then the text, not what I'm after > > para = Paragraph("", style=body_style, bulletText="This is > > bulleted text.") > > #displays nothing > > para = Paragraph("\xe2\x80\xa2", style=body_style, bulletText="This is > > bulleted text.") #Bullet character AFTER the bullet text > > > > This is the last thing I need to get working before I can finish my > > programming. > > > > Thanks for your help. > > The optional argument bulletText is not the content of your paragraph, > but the bullet itself. > For example, try > para = Paragraph("Blah Blah Blubberfasel Blah", bulletText="a)", > style=body_style) > or > para = Paragraph("This is bulleted text.", style=body_style, > bulletText="\xe2\x80\xa2") > > Hint: Don't just read the documentation, also look at the tests folder > (unfortunately not included in the Windows installer). > > Henning > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Mon Oct 13 15:30:55 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 13 Oct 2008 20:30:55 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> Message-ID: <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> 2008/10/13 Peter Mattingly > For fans of the XML approach this works for that application: > > text = " bulletIndent=15>\xe2\x80\xa2This is bulleted text." > > para = Paragraph(text, style=body_style) > story.append(para) > > I got the bullet character from the documentation; Who knows where they got > that, I certainly can't find any reference that that code / format when I > google it. We probably got it from trial and error, looking through all glyphs in Helvetica and Times Roman for something vaguely bullet-like. But it was 8 years ago so I can't remember. If you find any "official" bullet character codes in Unicode which work better, please let us know... - Andy From pmattingly at mail.csuchico.edu Mon Oct 13 15:34:42 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 12:34:42 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> Message-ID: Here you go: http://en.wikipedia.org/wiki/Bullet_list "*The bullet corresponds to Unicode character U+2022.*In HTML , the codes • and • give ? and ?, respectively, but semantics requires that bulleted items be achieved with the appropriate use of the
  • tag inside an unordered list (
      ). *Unicode also defines a triangularbullet ? (U+2023).*" =D On Mon, Oct 13, 2008 at 12:30 PM, Andy Robinson wrote: > 2008/10/13 Peter Mattingly > > For fans of the XML approach this works for that application: > > > > text = " > bulletIndent=15>\xe2\x80\xa2This is bulleted text." > > > > para = Paragraph(text, style=body_style) > > story.append(para) > > > > I got the bullet character from the documentation; Who knows where they > got > > that, I certainly can't find any reference that that code / format when I > > google it. > > We probably got it from trial and error, looking through all glyphs in > Helvetica and Times Roman for something vaguely bullet-like. But it > was 8 years ago so I can't remember. > If you find any "official" bullet character codes in Unicode which > work better, please let us know... > > > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralsina at netmanagers.com.ar Mon Oct 13 15:32:18 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Mon, 13 Oct 2008 16:32:18 -0300 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> References: <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> Message-ID: <200810131632.23404.ralsina@netmanagers.com.ar> On Monday 13 October 2008 16:30:55 Andy Robinson wrote: > 2008/10/13 Peter Mattingly > > > For fans of the XML approach this works for that application: > > > > text = " > bulletIndent=15>\xe2\x80\xa2This is bulleted text." > > > > para = Paragraph(text, style=body_style) > > story.append(para) > > > > I got the bullet character from the documentation; Who knows where they > > got that, I certainly can't find any reference that that code / format > > when I google it. > > We probably got it from trial and error, looking through all glyphs in > Helvetica and Times Roman for something vaguely bullet-like. But it > was 8 years ago so I can't remember. > If you find any "official" bullet character codes in Unicode which > work better, please let us know... U+2022 is supposed to be the unicode bullet. It's not on any non-unicode ont, of course, so it will be hit and miss with the "default" fonts. There is also U+2023 (arrow bullet) and U+2043 (dash bullet). -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan From pmattingly at mail.csuchico.edu Mon Oct 13 15:36:54 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 12:36:54 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> Message-ID: Great work on this library by the way. Your work kicks the crap out of OOo API hands down. Thanks. ^__^ On Mon, Oct 13, 2008 at 12:30 PM, Andy Robinson wrote: > 2008/10/13 Peter Mattingly > > For fans of the XML approach this works for that application: > > > > text = " > bulletIndent=15>\xe2\x80\xa2This is bulleted text." > > > > para = Paragraph(text, style=body_style) > > story.append(para) > > > > I got the bullet character from the documentation; Who knows where they > got > > that, I certainly can't find any reference that that code / format when I > > google it. > > We probably got it from trial and error, looking through all glyphs in > Helvetica and Times Roman for something vaguely bullet-like. But it > was 8 years ago so I can't remember. > If you find any "official" bullet character codes in Unicode which > work better, please let us know... > > > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Mon Oct 13 15:38:32 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 13 Oct 2008 20:38:32 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <200810131632.23404.ralsina@netmanagers.com.ar> References: <956003ae0810131230s52637d22gece7cf41e3a33492@mail.gmail.com> <200810131632.23404.ralsina@netmanagers.com.ar> Message-ID: <956003ae0810131238s1e31dc5fn7fda0934f1f31383@mail.gmail.com> 2008/10/13 Roberto Alsina : > U+2022 is supposed to be the unicode bullet. It's not on any non-unicode ont, > of course, so it will be hit and miss with the "default" fonts. > > There is also U+2023 (arrow bullet) and U+2043 (dash bullet). OK, I'll see if they work. (We can put those characters in the example, but what actually happens in output depends on Adobe and the font vendors, not us). - Andy From timr at probo.com Mon Oct 13 15:41:07 2008 From: timr at probo.com (Tim Roberts) Date: Mon, 13 Oct 2008 12:41:07 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> Message-ID: <48F3A453.7000908@probo.com> Peter Mattingly wrote: > For fans of the XML approach this works for that application: > > text = " bulletIndent=15>\xe2\x80\xa2This is bulleted text." > > para = Paragraph(text, style=body_style) > story.append(para) > > I got the bullet character from the documentation; Who knows where > they got that, I certainly can't find any reference that that code / > format when I google it. Really? Those three bytes are the UTF-8 representation of the Unicode character U+2022, which is "Bullet". So, it could have been written: text = u"\u2202This is bulleted text." -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From pmattingly at mail.csuchico.edu Mon Oct 13 15:58:12 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 12:58:12 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <48F3A453.7000908@probo.com> References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> <48F3A453.7000908@probo.com> Message-ID: Sure, see for yourself: http://www.google.com/search?hl=en&fkt=&fsdt=&q=\xe2\x80\xa2&btnG=Google+Search&aq=f&oq=&sourceid=Mozilla-search The search wasn't very helpful in finding out more about the bullet character. The code you posted does something odd on my setup: ? This is bulleted text. I don't know if that'll come through, here's a Wikipedia page: http://en.wikipedia.org/wiki/%E2%88%82 On Mon, Oct 13, 2008 at 12:41 PM, Tim Roberts wrote: > Peter Mattingly wrote: > > For fans of the XML approach this works for that application: > > > > text = " > bulletIndent=15>\xe2\x80\xa2This is bulleted text." > > > > para = Paragraph(text, style=body_style) > > story.append(para) > > > > I got the bullet character from the documentation; Who knows where > > they got that, I certainly can't find any reference that that code / > > format when I google it. > > Really? Those three bytes are the UTF-8 representation of the Unicode > character U+2022, which is "Bullet". So, it could have been written: > text = u" bulletIndent=15>\u2202This is bulleted text." > > -- > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Mon Oct 13 16:26:16 2008 From: timr at probo.com (Tim Roberts) Date: Mon, 13 Oct 2008 13:26:16 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> <48F3A453.7000908@probo.com> Message-ID: <48F3AEE8.20607@probo.com> Peter Mattingly wrote: > Sure, see for yourself: > > http://www.google.com/search?hl=en&fkt=&fsdt=&q=\xe2\x80\xa2&btnG=Google+Search&aq=f&oq=&sourceid=Mozilla-search > > > The search wasn't very helpful in finding out more about the bullet > character. > > The code you posted does something odd on my setup: > > ? This is bulleted text. > > I don't know if that'll come through, here's a Wikipedia page: > > http://en.wikipedia.org/wiki/%E2%88%82 Yes, I mistakenly wrote \u2202 in that string instead of \u2022. U+2202 is, indeed, the partial differential symbol (italic Greek lower-case delta). -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From pmattingly at mail.csuchico.edu Mon Oct 13 16:57:41 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 13:57:41 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <48F3AEE8.20607@probo.com> References: <77A9E75DA75C564D82BDC4B18A7D8525305607@ROHRPOSTIX.tup.ads> <48F3A453.7000908@probo.com> <48F3AEE8.20607@probo.com> Message-ID: Ah I see. Works perfectly now. On Mon, Oct 13, 2008 at 1:26 PM, Tim Roberts wrote: > Peter Mattingly wrote: > > Sure, see for yourself: > > > > > http://www.google.com/search?hl=en&fkt=&fsdt=&q=\xe2\x80\xa2&btnG=Google+Search&aq=f&oq=&sourceid=Mozilla-search > > < > http://www.google.com/search?hl=en&fkt=&fsdt=&q=%5Cxe2%5Cx80%5Cxa2&btnG=Google+Search&aq=f&oq=&sourceid=Mozilla-search > > > > > > The search wasn't very helpful in finding out more about the bullet > > character. > > > > The code you posted does something odd on my setup: > > > > ? This is bulleted text. > > > > I don't know if that'll come through, here's a Wikipedia page: > > > > http://en.wikipedia.org/wiki/%E2%88%82 > > Yes, I mistakenly wrote \u2202 in that string instead of \u2022. U+2202 > is, indeed, the partial differential symbol (italic Greek lower-case > delta). > > -- > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmattingly at mail.csuchico.edu Mon Oct 13 17:12:43 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 14:12:43 -0700 Subject: [reportlab-users] Multi-page formatting in Platypus Message-ID: I need to format several pages with a common header and common body frame. >From the API ref I see: A special case document template that will handle many simple documents. See documentation for BaseDocTemplate. No pageTemplates are required for this special case. A page templates are inferred from the margin information and the onFirstPage, onLaterPages arguments to the build method. A document which has all pages with the same look except for the first page may can be built using this special approach. Which implies that special additional frame definitions, page templates, etc. Aren't required if all of the pages are the same, which is the case here. So I should only need to append header information to new pages. This does not work. When spanning multiple pages, no new frames are defined and the text is printed to the canvas directly. for i in range(40): text = """Multipage test!!!""" para = Paragraph(text, style=body_style) story.append(para) story.append(PageBreak()) text = """This is a header.""" para = Paragraph(text, style=header_style) story.append(para) story.append(FrameBreak()) #force the writer onto to the next frame (the body) for i in range(5): text = """Multipage test!!!""" para = Paragraph(text, style=body_style) story.append(para) This complies into three pages. The first with my testing paragraphs, the second with the words "This is a header." on the canvas (e.i. Not in my previously defined header frame) and the third with my final testing paragraphs. I've found a little documentation from the API reference and the examples: def first_pg(canvas, document): document.addPageTemplates(default_page_templates) def next_pg(canvas, document): document.addPageTemplates(default_page_templates) pdf.build(story, onFirstPage=first_pg, onLaterPages=next_pg) but they have not provided a solution as the behavior is unchanged from the default: pdf.build(story) So: How do I define my frames across all of my pages? -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Mon Oct 13 17:59:25 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 13 Oct 2008 22:59:25 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: Message-ID: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> 2008/10/12 Peter Mattingly : > Always such a headache to program OSS things, would it kill anyone to > make the documentation complete? =*( I just went to look, and section 6.4 of the user guide (on bullets) seems to me to explain what to do quite clearly, but I have expanded it a little. Was there other documentation which misled you? Roberto's sig: >Debugging is twice as hard as writing the code in the first place. >Therefore, if you write the code as cleverly as possible, you are, >by definition, not smart enough to debug it. --Brian W. Kernighan Documenting code well is at least 2x as hard as debugging it. Would it kill people to send in patches to the docs? Maybe just one, before we are ten years old? ;-) - Andy From andy at reportlab.com Mon Oct 13 18:21:09 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 13 Oct 2008 23:21:09 +0100 Subject: [reportlab-users] Multi-page formatting in Platypus In-Reply-To: References: Message-ID: <956003ae0810131521s40a4395atf876a17c3aff8422@mail.gmail.com> 2008/10/13 Peter Mattingly : > > So: How do I define my frames across all of my pages? Headers like this don't go in frames. The frames are for the flowing content. They must be defined either as callback functions passed to the PageTemplate's constructor, which decorate the new page when it starts; or as subclasses of PageTemplate which do the same. Providing a generic "graphics callback" is far more flexible; it lets you do page borders, not just filling a box at the top or bottom like most word processors. Look at some of the tests in tests/test_platypus_*.py, or in tools/docco/rltemplate.py which is the template used for the manual. I admit the manual never explained this well; if someone can send in a contrib for this for the Platypus chapter, we'd be really grateful. - Andy From pmattingly at mail.csuchico.edu Mon Oct 13 18:52:35 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Mon, 13 Oct 2008 15:52:35 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> Message-ID: You know what I mean though? Sufficient technical documentation is one huge hurdle that OSS in general has to get over before any sort of general (read: Non-maddeningly frustrating) adoption can take place. And...you can patch the docs? First I've heard of doing that... On Mon, Oct 13, 2008 at 2:59 PM, Andy Robinson wrote: > 2008/10/12 Peter Mattingly : > > Always such a headache to program OSS things, would it kill anyone > to > > make the documentation complete? =*( > > > I just went to look, and section 6.4 of the user guide (on bullets) > seems to me to explain what to do quite clearly, but I have expanded > it a little. > > Was there other documentation which misled you? > > Roberto's sig: > >Debugging is twice as hard as writing the code in the first place. > >Therefore, if you write the code as cleverly as possible, you are, > >by definition, not smart enough to debug it. --Brian W. Kernighan > > Documenting code well is at least 2x as hard as debugging it. > Would it kill people to send in patches to the docs? Maybe just > one, > before we are ten years old? ;-) > > > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Mon Oct 13 19:14:11 2008 From: timr at probo.com (Tim Roberts) Date: Mon, 13 Oct 2008 16:14:11 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> Message-ID: <48F3D643.50306@probo.com> Peter Mattingly wrote: > You know what I mean though? Sufficient technical documentation is > one huge hurdle that OSS in general has to get over before any sort of > general (read: Non-maddeningly frustrating) adoption can take place. I'm not sure that's really the case. Remember that Reportlab is a low-level Python library -- a programmer's library. With non-open-source programmer libraries, technical documentation is absolutely critical, because that's all you get. Parameters and corner cases had better be documented in excruciating detail, because you can't go look it up anywhere else. With an open source project, the source code is, in a sense, second-level documentation. It's not always worth the investment to document every possible nook and cranny, because you can assume people who fall into the nooks have the ability to go look up the exits in the source code. The business model is different. If you're selling a programmer's library, it is in your best interest to document the heck out of it. Better documentation leads to more sales. What's the model in open source? A good library brings in less and less sophisticated users, which generates more and more stupid questions that take up time you're not getting paid for. It's not a black-and-white situation. > And...you can patch the docs? First I've heard of doing that... Sure. They're part of the source distribution, as they are in most open source projects. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From andy at reportlab.com Tue Oct 14 02:24:00 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 14 Oct 2008 07:24:00 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> Message-ID: <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> 2008/10/13 Peter Mattingly : > You know what I mean though? Sufficient technical documentation is one huge > hurdle that OSS in general has to get over before any sort of general (read: > Non-maddeningly frustrating) adoption can take place. You're correct; it is a weakness. (But i our favour, we do have a broadly accurate user guide, the source to create it, and a ton of readable, working tests). But it also takes a heck of a lot of time - more than maintaining the code does. It's not just documenting new features, it's constantly pruning and editing everything which may be affected by a change. The only workable solution is a community effort, which I have been pleading for on this list for years. > > And...you can patch the docs? First I've heard of doing that... The source to the docs has been in every distro since launch until, oh, about 3 weeks ago (you have to use svn now). They are just Python scripts. This was our criterion for release 1. If someone finds that the user guide doesn't explain something clearly enough, and has an hour to spare, it would be great if they could either (a) send in a patch correcting or expanding it (i.e. 20 lines to generate the right paragraphs in the guide); or (b) send in a test script or teaching example. We can review and check these things quickly. Best Regards, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From yroman-reportlab at altalang.com Tue Oct 14 18:33:11 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Tue, 14 Oct 2008 18:33:11 -0400 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com> Message-ID: <002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> Yoann Roman wrote... > This is probably the opposite than most people want, but I'm trying > to stop ReportLab from embedding TTF fonts, such as Arial. Anyone have any suggestions for this? I've dug around in the font embedding code, but I haven't seen anything promising yet. Thanks, -- Yoann Roman From andy at reportlab.com Tue Oct 14 18:40:12 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 14 Oct 2008 23:40:12 +0100 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com> <002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> Message-ID: <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> 2008/10/14 Yoann Roman : > Yoann Roman wrote... >> This is probably the opposite than most people want, but I'm trying >> to stop ReportLab from embedding TTF fonts, such as Arial. > > Anyone have any suggestions for this? I've dug around in the font > embedding code, but I haven't seen anything promising yet. I have no idea at all, nor do I understand why to do this. According to the PDF spec, the standard 14 Postscript font names are supported by Adobe Reader, so all we need to do is put the word 'Helvetica' in the file, and Reader can display it. (Actually it will use a variant of Arial on Windows for display, but that's their business). But for any other fonts, you are supposed to embed the font. Otherwise there is no way for Adobe Reader or other viewers to display it. And PDF/A. the archive standard, requires you to fully embed ALL your fonts to ensure fidelity of display in decades time... -- Why do you want to use a custom font, but not embed it? - Andy From andy at reportlab.com Tue Oct 14 19:22:55 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 15 Oct 2008 00:22:55 +0100 Subject: [reportlab-users] Tracker Message-ID: <956003ae0810141622j12c8af74n86c2b2c4b6b38ea0@mail.gmail.com> There is a basic public tracker up now: https://admin.reportlab.com/mantis/project/core/tracker/ For now it's just a brief list of known issues. (It's part of a bigger 2-year-old app which we need to upgrade to Django 1.0+ before we can hack on it easily...). If anyone has reported issues or sent patches we've missed, please repost them and we'll ensure they are logged and dealt with. Best Regards, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From ing.miguel.angel at gmail.com Wed Oct 15 00:33:32 2008 From: ing.miguel.angel at gmail.com (Miguel Angel) Date: Tue, 14 Oct 2008 23:33:32 -0500 Subject: [reportlab-users] Reportlab + Python + RHEL 4 = Traceback (most recent call last) In-Reply-To: <956003ae0810122313n4b8fb2c6m9f06904bab621d14@mail.gmail.com> References: <956003ae0810122313n4b8fb2c6m9f06904bab621d14@mail.gmail.com> Message-ID: Thanks Andy, Runs perfect with Python 2.5 and Reportlab 2.2!!!!!!!! On Mon, Oct 13, 2008 at 1:13 AM, Andy Robinson wrote: > 2008/10/12 Miguel Angel : >> Hi, first of all, I would like to apologize for my english. >> >> I have a linux box with RHEL 4 and: >> - python-reportlab-1.20-1.rf > >> KeyError: u'\xc1' >> >> What is the problem? > > I am not sure of the exact bug, but you are using a very old > (pre-Unicode) version of ReportLab and trying to work with > unicode strings. You should upgrade to 2.2, as the 1.x > versions simply did not support Unicode properly. > > Best Regards, > -- > Andy Robinson > CEO/Chief Architect > ReportLab Europe Ltd. > 165 The Broadway, Wimbledon, London SW19 1NE, UK > Tel +44-20-8544-8049 > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -- Atentamente, Miguel Angel Moreno Bola?os Usuario Linux registrado No. 391784 http://counter.li.org "El amor es un dolor entre pecho y espalda, que sabe a papas fritas sin salsa de tomate!" Att: Nous From dirk.holtwick at gmail.com Wed Oct 15 03:37:24 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Wed, 15 Oct 2008 09:37:24 +0200 Subject: [reportlab-users] [BUG] Installation error on Windows Message-ID: <48F59DB4.1080507@gmail.com> Hi, I tried to install Reportlab 2.2 under Windows like this: $ python setup.py install And got the following error: -----------------8<---------------[cut here] ... running build_clib error: Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing "-c mingw32" to setup.py. -----------------8<---------------[cut here] Since Reportlab also works without the speedup extensions it would be great if the installer could pass this step if a compiler is not available. Dirk From andy at reportlab.com Wed Oct 15 03:39:49 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 15 Oct 2008 08:39:49 +0100 Subject: [reportlab-users] [BUG] Installation error on Windows In-Reply-To: <48F59DB4.1080507@gmail.com> References: <48F59DB4.1080507@gmail.com> Message-ID: <956003ae0810150039v3312c655gc5d74b6d70caa495@mail.gmail.com> 2008/10/15 Dirk Holtwick : > Hi, > > I tried to install Reportlab 2.2 under Windows like this: > > $ python setup.py install > > Since Reportlab also works without the speedup extensions it would be great > if the installer could pass this step if a compiler is not available. Yes, but is distutils/setuptools smart enough to do that? And doesn't every Python package with a C extension behave like this if you lack the compiler? Why don't you use the proper Windows installer? Look near the bottom of the download page: http://www.reportlab.org/downloads.html#dlls - Andy From dirk.holtwick at gmail.com Wed Oct 15 03:48:07 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Wed, 15 Oct 2008 09:48:07 +0200 Subject: [reportlab-users] [BUG] Installation error on Windows In-Reply-To: <956003ae0810150039v3312c655gc5d74b6d70caa495@mail.gmail.com> References: <48F59DB4.1080507@gmail.com> <956003ae0810150039v3312c655gc5d74b6d70caa495@mail.gmail.com> Message-ID: <48F5A037.8040601@gmail.com> > Yes, but is distutils/setuptools smart enough to do that? And doesn't every > Python package with a C extension behave like this if you lack the compiler? Yes, they behave like this. But Reportlab is not constricted to have the extensions working (imagine Google AppEngine, see discussion before in this list). BTW, Reportlab 2.1 installer did not emit these errors and worked fine. I don't know if this option can be checked by distutils or setuptools. I would suggest to separate the extensions from the core package. Or make them optional. > Why don't you use the proper Windows installer? Look near the bottom > of the download page: > > http://www.reportlab.org/downloads.html#dlls Because I set up a virtual environment using "virtualenv". No idea how to use the Windows installers there... This is not a problem for me, because I just copied the "reportlab" folder to the correct "site-packages" folder. But my user of Pisa may get confused if the run in such a problem. Therefore it would be great if this issue could be considered to be fixed. Maybe this is also an issue for Linux and Mac users who do not have installed the compiler and headers? Dirk From andy at reportlab.com Wed Oct 15 04:09:28 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 15 Oct 2008 09:09:28 +0100 Subject: [reportlab-users] [BUG] Installation error on Windows In-Reply-To: <48F5A037.8040601@gmail.com> References: <48F59DB4.1080507@gmail.com> <956003ae0810150039v3312c655gc5d74b6d70caa495@mail.gmail.com> <48F5A037.8040601@gmail.com> Message-ID: <956003ae0810150109md8e3c12r133eeb9721496a16@mail.gmail.com> 2008/10/15 Dirk Holtwick : > Yes, they behave like this. But Reportlab is not constricted to have the > extensions working (imagine Google AppEngine, see discussion before in this > list). True, but we have to make a decision which is the default, because Python's setup tools are not interactive and don't give you checkboxes and options. We decided the C extensions should be included in the SOURCE distro by default. If we can figure out an easy way to detect the compiler and proceed without it, we will, but we have very little time. Could you look into this? >> Why don't you use the proper Windows installer? Look near the bottom >> of the download page: >> > Because I set up a virtual environment using "virtualenv". No idea how to > use the Windows installers there... Oh damn, yet another permutation to support....I suspect the distutils windows-exe-builder is not going to be virtualenv-aware any time soon. Anyone got any ideas on this? - Andy From dirk.holtwick at gmail.com Wed Oct 15 04:30:26 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Wed, 15 Oct 2008 10:30:26 +0200 Subject: [reportlab-users] [BUG] Installation error on Windows In-Reply-To: <956003ae0810150109md8e3c12r133eeb9721496a16@mail.gmail.com> References: <48F59DB4.1080507@gmail.com> <956003ae0810150039v3312c655gc5d74b6d70caa495@mail.gmail.com> <48F5A037.8040601@gmail.com> <956003ae0810150109md8e3c12r133eeb9721496a16@mail.gmail.com> Message-ID: <48F5AA22.4030802@gmail.com> > We decided the C extensions should be included in the SOURCE distro > by default. If we can figure out an easy way to detect the compiler > and proceed without it, we will, but we have very little time. Could you > look into this? Look at the setup.py of "simplejson": http://simplejson.googlecode.com/svn/tags/simplejson-2.0.3/setup.py I found this hint in this thread (there is another example in the answers): http://osdir.com/ml/python.distutils.devel/2007-03/msg00051.html > Oh damn, yet another permutation to support....I suspect the distutils > windows-exe-builder is not going to be virtualenv-aware any time soon. > Anyone got any ideas on this? I don't think that this has to be handled in a special way. If you want to know if you are in the virtualenv you might want to look vor the existence of the environment variable "VIRTUAL_ENV". Dirk From yroman-reportlab at altalang.com Wed Oct 15 10:12:58 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Wed, 15 Oct 2008 10:12:58 -0400 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com><002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> Message-ID: <001501c92ed0$2064ec10$0502000a@ad.altalang.com> Andy Robinson wrote... > But for any other fonts, you are supposed to embed the font. > Otherwise there is no way for Adobe Reader or other viewers to > display it. I looked into Acrobat 9's default settings, and it *does* embed subsets of all fonts except for Arial, Arial Black, Arial Narrow, Century Gothic, Courier New, Georgia, Impact, Lucida Console, Tahoma, Times New Roman, Trebuchet, and Verdana. It has all those on a "never embed" list for its "Standard" profile. The best I can find in terms of reasoning is this: http://kb.adobe.com/selfservice/viewContent.do?externalId=328520 http://kb.adobe.com/selfservice/viewContent.do?externalId=326402 I'm guessing Adobe decided to reduce everyday PDF sizes by assuming that users would always have those fonts (at least on Windows). > Why do you want to use a custom font, but not embed it? I'm still working on replacing an Access reporting solution that used Acrobat with ReportLab. The issue I ran into is that the RL PDFs are much larger because all variants of Arial (e.g., bold, bold italic) are embedded instead of Acrobat's approach. I'm certainly not suggesting to make this the default and agree that custom fonts should be embedded, but I'd like to have the option in this particular case. Thanks, -- Yoann Roman From andy at reportlab.com Wed Oct 15 10:37:36 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 15 Oct 2008 15:37:36 +0100 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <001501c92ed0$2064ec10$0502000a@ad.altalang.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com> <002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> <001501c92ed0$2064ec10$0502000a@ad.altalang.com> Message-ID: <956003ae0810150737k469f8dd7s2fe968696b14718@mail.gmail.com> 2008/10/15 Yoann Roman : > I looked into Acrobat 9's default settings, and it *does* embed subsets > of all fonts except for Arial, Arial Black, Arial Narrow, Century > Gothic, Courier New, Georgia, Impact, Lucida Console, Tahoma, Times New > Roman, Trebuchet, and Verdana. It has all those on a "never embed" list > for its "Standard" profile. Interesting. To be honest we haven't looked at this for years, as we aim to work on older copies of Acrobat Reader (4.0 and up). Looks like their policies are changing to expand the list of "built in" fonts beyond the "standard 14". > I'm still working on replacing an Access reporting solution that used > Acrobat with ReportLab. The issue I ran into is that the RL PDFs are > much larger because all variants of Arial (e.g., bold, bold italic) are > embedded instead of Acrobat's approach. That's easy. Just switch to Helvetica. It's one of the built-in fonts (going back to the first ever Postscript printer), so nothing will be embedded and you'll get the smallest files and fastest generation. A designer or typographer might be able to tell the difference, but this is only an issue if you're trying to replace Access without tellling anyone you've done it ;-) Hope this helps, Andy From yroman-reportlab at altalang.com Wed Oct 15 10:57:26 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Wed, 15 Oct 2008 10:57:26 -0400 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <956003ae0810150737k469f8dd7s2fe968696b14718@mail.gmail.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com><002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com><956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com><001501c92ed0$2064ec10$0502000a@ad.altalang.com> <956003ae0810150737k469f8dd7s2fe968696b14718@mail.gmail.com> Message-ID: <001601c92ed6$56552730$0502000a@ad.altalang.com> Andy Robinson wrote... > That's easy. Just switch to Helvetica. It's one of the built-in > fonts (going back to the first ever Postscript printer), so nothing > will be embedded and you'll get the smallest files and fastest > generation. That might do the trick. Just to make sure, though, is there no way to use a custom TTF font and not have it embed? > A designer or typographer might be able to tell the difference, but > this is only an issue if you're trying to replace Access without > tellling anyone you've done it ;-) Shhh... :-) -- Yoann Roman From timr at probo.com Wed Oct 15 13:27:34 2008 From: timr at probo.com (Tim Roberts) Date: Wed, 15 Oct 2008 10:27:34 -0700 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <001501c92ed0$2064ec10$0502000a@ad.altalang.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com><002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> <001501c92ed0$2064ec10$0502000a@ad.altalang.com> Message-ID: <48F62806.9080106@probo.com> Yoann Roman wrote: > I looked into Acrobat 9's default settings, and it *does* embed subsets > of all fonts except for Arial, Arial Black, Arial Narrow, Century > Gothic, Courier New, Georgia, Impact, Lucida Console, Tahoma, Times New > Roman, Trebuchet, and Verdana. It has all those on a "never embed" list > for its "Standard" profile. > That's fascinating, because it means those PDFs cannot be viewed on Windows 2000 or Windows 98 without Microsoft Office. That's an incredibly bone-headed decision on their part. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From bfreeman at appropriatesolutions.com Wed Oct 15 13:56:29 2008 From: bfreeman at appropriatesolutions.com (Bill Freeman) Date: Wed, 15 Oct 2008 13:56:29 -0400 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <48F62806.9080106@probo.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com><002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> <001501c92ed0$2064ec10$0502000a@ad.altalang.com> <48F62806.9080106@probo.com> Message-ID: <48F62ECD.7040003@appropriatesolutions.com> Tim Roberts wrote: > Yoann Roman wrote: > >> I looked into Acrobat 9's default settings, and it *does* embed subsets >> of all fonts except for Arial, Arial Black, Arial Narrow, Century >> Gothic, Courier New, Georgia, Impact, Lucida Console, Tahoma, Times New >> Roman, Trebuchet, and Verdana. It has all those on a "never embed" list >> for its "Standard" profile. >> >> > > That's fascinating, because it means those PDFs cannot be viewed on > Windows 2000 or Windows 98 without Microsoft Office. That's an > incredibly bone-headed decision on their part. > > Unless the acrobat reader they're offering for those products is packaged with those fonts. From sw at tiac.net Wed Oct 15 14:15:37 2008 From: sw at tiac.net (Steve Witham) Date: Wed, 15 Oct 2008 14:15:37 -0400 Subject: [reportlab-users] italic Greek lower-case delta In-Reply-To: References: Message-ID: >From: Tim Roberts >U+2202 >is, indeed, the partial differential symbol (italic Greek lower-case delta). OMG the squirly-d is ITALIC DELTA!? No wonder I can't figure out what half the Greek characters in math are! --Steve From timr at probo.com Wed Oct 15 14:17:03 2008 From: timr at probo.com (Tim Roberts) Date: Wed, 15 Oct 2008 11:17:03 -0700 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <48F62ECD.7040003@appropriatesolutions.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com><002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> <001501c92ed0$2064ec10$0502000a@ad.altalang.com> <48F62806.9080106@probo.com> <48F62ECD.7040003@appropriatesolutions.com> Message-ID: <48F6339F.1070308@probo.com> Bill Freeman wrote: > Tim Roberts wrote: >> Yoann Roman wrote: >> >>> I looked into Acrobat 9's default settings, and it *does* embed >>> subsets of all fonts except for Arial, Arial Black, Arial Narrow, >>> Century Gothic, Courier New, Georgia, Impact, Lucida Console, >>> Tahoma, Times New Roman, Trebuchet, and Verdana. It has all those on >>> a "never embed" list for its "Standard" profile. >>> >> >> That's fascinating, because it means those PDFs cannot be viewed on >> Windows 2000 or Windows 98 without Microsoft Office. That's an >> incredibly bone-headed decision on their part. >> > Unless the acrobat reader they're offering for those products is > packaged with those fonts. The beauty of PDF files is that you don't need an exact version match to read a file. I shouldn't need a new reader to read a new PDF. If I have Acrobat Reader 5 on Windows 98, it won't be able to display those files. Plus, those fonts are licensed, and Adobe and Microsoft haven't been on the friendliest of terms. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From yroman-reportlab at altalang.com Wed Oct 15 14:48:07 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Wed, 15 Oct 2008 14:48:07 -0400 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <48F6339F.1070308@probo.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com><002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> <001501c92ed0$2064ec10$0502000a@ad.altalang.com> <48F62806.9080106@probo.com><48F62ECD.7040003@appropriatesolutions.com> <48F6339F.1070308@probo.com> Message-ID: <002d01c92ef6$904df370$0502000a@ad.altalang.com> Tim Roberts wrote... > The beauty of PDF files is that you don't need an exact version match > to read a file. I shouldn't need a new reader to read a new PDF. If > I have Acrobat Reader 5 on Windows 98, it won't be able to display > those files. It looks like the only problematic ones are Arial Narrow (all), Century Gothic (2000/XP), Georgia (98), and Trebuchet (98). All other fonts are, according to Adobe, installed by default on Windows 98/2000/XP. Of course, this says nothing of Mac compatibility. Acrobat's "High Quality Print" and "Press" settings clear this "never embed" font list so that everything is included. I can't find any official Adobe reasoning, so my guess is they accepted the possible compatibility issues for smaller file sizes by default. As for doing this with ReportLab, it turned out to be a fairly easy patch. I'll send it along for review under a tagged subject per Andy's recommendation. -- Yoann Roman From yroman-reportlab at altalang.com Wed Oct 15 15:06:28 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Wed, 15 Oct 2008 15:06:28 -0400 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option Message-ID: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> Per the earlier discussion (see "Disable TTF Embedding"), I was looking for a way to replicate Acrobat's "never embed" font option in RL. The only patch needed for TrueType fonts was to ttfonts.py. The default behavior does not change; this adds an optional "embed" argument to TTFont that, if explicitly set to 0, will prevent the font embedding. I wasn't sure if the encoding was necessary. Acrobat specifies it, the spec says its optional, and RL leaves it out for TTFs. I followed RL and left it out. I'm certainly no PDF spec expert and don't know if this has unintended side effects. I also realize most people won't need this, but, since it doesn't change the default behavior and is a minimal patch, I don't see any harm in adding it. Thanks, -- Yoann Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: embedFonts.patch Type: application/octet-stream Size: 4128 bytes Desc: not available Url : From yroman-reportlab at altalang.com Wed Oct 15 15:27:19 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Wed, 15 Oct 2008 15:27:19 -0400 Subject: [reportlab-users] Tracker In-Reply-To: <956003ae0810141622j12c8af74n86c2b2c4b6b38ea0@mail.gmail.com> References: <956003ae0810141622j12c8af74n86c2b2c4b6b38ea0@mail.gmail.com> Message-ID: <003a01c92efc$0a2ae770$0502000a@ad.altalang.com> > There is a basic public tracker up now: > > https://admin.reportlab.com/mantis/project/core/tracker/ Thanks for this! -- Yoann Roman From wilk at flibuste.net Wed Oct 15 16:18:00 2008 From: wilk at flibuste.net (William Dode) Date: Wed, 15 Oct 2008 20:18:00 +0000 (UTC) Subject: [reportlab-users] Tracker References: <956003ae0810141622j12c8af74n86c2b2c4b6b38ea0@mail.gmail.com> Message-ID: On 14-10-2008, Andy Robinson wrote: > There is a basic public tracker up now: > > https://admin.reportlab.com/mantis/project/core/tracker/ Fine ! It's a very good idea to put the link of the gmane discussion. thanks -- William Dod? - http://flibuste.net Informaticien Ind?pendant From andy at reportlab.com Thu Oct 16 02:40:04 2008 From: andy at reportlab.com (Andy Robinson) Date: Thu, 16 Oct 2008 07:40:04 +0100 Subject: [reportlab-users] Disable TTF Embedding In-Reply-To: <48F62806.9080106@probo.com> References: <008201c92b2a$d787ecc0$0502000a@ad.altalang.com> <002901c92e4c$d6d8e2a0$0502000a@ad.altalang.com> <956003ae0810141540q3fab3e97p7ef8cdc38afbb11b@mail.gmail.com> <001501c92ed0$2064ec10$0502000a@ad.altalang.com> <48F62806.9080106@probo.com> Message-ID: <956003ae0810152340r641a99a8ta9623d5a61002c87@mail.gmail.com> 2008/10/15 Tim Roberts : > That's fascinating, because it means those PDFs cannot be viewed on > Windows 2000 or Windows 98 without Microsoft Office. That's an > incredibly bone-headed decision on their part. Unless those fonts are buried inside Adobe Reader, so they can be viewed anywhere. The latter makes some sense to me.. - Andy From robin at reportlab.com Thu Oct 16 07:24:59 2008 From: robin at reportlab.com (Robin Becker) Date: Thu, 16 Oct 2008 12:24:59 +0100 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> Message-ID: <48F7248B.4000809@chamonix.reportlab.co.uk> Yoann Roman wrote: > Per the earlier discussion (see "Disable TTF Embedding"), I was looking > for a way to replicate Acrobat's "never embed" font option in RL. > > The only patch needed for TrueType fonts was to ttfonts.py. The default > behavior does not change; this adds an optional "embed" argument to > TTFont that, if explicitly set to 0, will prevent the font embedding. > > I wasn't sure if the encoding was necessary. Acrobat specifies it, the > spec says its optional, and RL leaves it out for TTFs. I followed RL > and left it out. > > I'm certainly no PDF spec expert and don't know if this has unintended > side effects. I also realize most people won't need this, but, since it > doesn't change the default behavior and is a minimal patch, I don't see > any harm in adding it. > > Thanks, ....... I'm really unclear why this should be used by any rational person, but if it works for you I see no reason not to use it. I am puzzled by the patch though. Should we not be turning off all of the subsetting code? It just happens that we currently preset the first subset to be the standard ascii subset (in the default case) so perhaps this won't work if two or more subsets are required. I'll try later with some tests high order arial characters. -- Robin Becker From robin at reportlab.com Thu Oct 16 09:16:46 2008 From: robin at reportlab.com (Robin Becker) Date: Thu, 16 Oct 2008 14:16:46 +0100 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> Message-ID: <48F73EBE.3040208@chamonix.reportlab.co.uk> Yoann Roman wrote: > Per the earlier discussion (see "Disable TTF Embedding"), I was looking > for a way to replicate Acrobat's "never embed" font option in RL. > > The only patch needed for TrueType fonts was to ttfonts.py. The default > behavior does not change; this adds an optional "embed" argument to > TTFont that, if explicitly set to 0, will prevent the font embedding. > > I wasn't sure if the encoding was necessary. Acrobat specifies it, the > spec says its optional, and RL leaves it out for TTFs. I followed RL > and left it out. > > I'm certainly no PDF spec expert and don't know if this has unintended > side effects. I also realize most people won't need this, but, since it > doesn't change the default behavior and is a minimal patch, I don't see > any harm in adding it. > ...... my earlier suspicions are proved correct. Using more than the first subset causes an error ValueError: redefining named object: 'fontDescriptor:ArialMT' that is one of our errors related to subsetting. We are trying to write out text using bytes; that means to use arial non-embedded we either need to subset it and make the subsets meaningful in some way or we need to regard arial as a T1 font with eg one of the standard adobe encodings. There may be some way to use unicode as the output format, but I don't know enough about how adobe reader works with these non-embedded system fonts to answer for sure. I don't think we should let this patch go till we can get at least this primitive test to work. > def testTTFNoEmbed(self): > if sys.platform!='win32': return > for x in 'windows', 'winnt': > fn = os.path.join('\\'+x,'fonts','arial.ttf') > if os.path.isfile(fn): break > fn = None > if not fn: return > def drawUsingArial(embed=1): > font = TTFont("Arial",fn) > pdfmetrics.registerFont(TTFont("Arial",fn,embed=embed)) > c = Canvas(outputfile('test_pdfbase_ttfonts-arial-%s.pdf' % (embed and 'embedded' or 'non-embedded'))) > c.drawString(100, 700, 'Testing Arial non-embedded') > > # Draw a table of Unicode characters > y = 700-14 > c.setFont('Arial', 10) > for i in xrange(0x20,0x132,8): > x = 100 > lab='%2.2x: '%i > c.drawString(x,y,lab) > x += font.stringWidth(lab,10) > for j in xrange(i,i+8): > c.drawString(x,y,unichr(j)) > x += 15 > y -= 14 > c.save() > from reportlab.pdfbase.pdfmetrics import _reset > _reset() > drawUsingArial(1) > drawUsingArial(0) -- Robin Becker From yroman-reportlab at altalang.com Thu Oct 16 09:19:15 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Thu, 16 Oct 2008 09:19:15 -0400 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <48F7248B.4000809@chamonix.reportlab.co.uk> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> Message-ID: <002301c92f91$c9cda230$0502000a@ad.altalang.com> > I'm really unclear why this should be used by any rational person, but > if it works for you I see no reason not to use it. I guess I'm just irrational :-). I wouldn't use this for anything other than Arial and Times New Roman, and it was solely to have the option of generating PDFs similar to those that Acrobat creates by default. > I am puzzled by the patch though. > > Should we not be turning off all of the subsetting code? > > It just happens that we currently preset the first subset to be the > standard ascii subset (in the default case) so perhaps this won't work > if two or more subsets are required. Probably. Creating this patch was my first look at the PDF spec and the font handling in RL, so I certainly don't have a firm grasp on it. I just aimed to get the keys between RL and Acrobat close enough, but I did notice the actual values differed between the two. I can send along the same PDF created in RL and Acrobat if that helps. Thanks, -- Yoann Roman From H.vonBargen at t-p.com Thu Oct 16 12:18:00 2008 From: H.vonBargen at t-p.com (Henning von Bargen) Date: Thu, 16 Oct 2008 18:18:00 +0200 Subject: [reportlab-users] Add TTF Embedding Option In-Reply-To: Message-ID: <77A9E75DA75C564D82BDC4B18A7D8525305617@ROHRPOSTIX.tup.ads> Yoann, can you explain why you cannot follow the earlier recommendation to use the built-in fonts (Helvetica, ...) instead? Another approach for a patch would be to support some kind of font-replacement table, in such a way that even if you specify Arial in the input, the library would use Helvetica internally instead. BTW Oracle Reports does it that way. Henning From andy at reportlab.com Thu Oct 16 12:23:54 2008 From: andy at reportlab.com (Andy Robinson) Date: Thu, 16 Oct 2008 17:23:54 +0100 Subject: [reportlab-users] Add TTF Embedding Option In-Reply-To: <77A9E75DA75C564D82BDC4B18A7D8525305617@ROHRPOSTIX.tup.ads> References: <77A9E75DA75C564D82BDC4B18A7D8525305617@ROHRPOSTIX.tup.ads> Message-ID: <956003ae0810160923j25f5b952wf676af62e05c8ad8@mail.gmail.com> 2008/10/16 Henning von Bargen : > Another approach for a patch would be to support some > kind of font-replacement table, in such a way that > even if you specify Arial in the input, the library > would use Helvetica internally instead. > Yes, this is something we probably need in the long run. We also need it for projects that create bitmaps - you might be able to use Helvetica in PDF, but need to tell the system to use Rina instead when making a PNG chart. But it's getting a lot more complex and unlikely to get done this month. - Andy From timr at probo.com Thu Oct 16 13:14:53 2008 From: timr at probo.com (Tim Roberts) Date: Thu, 16 Oct 2008 10:14:53 -0700 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <002301c92f91$c9cda230$0502000a@ad.altalang.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> <002301c92f91$c9cda230$0502000a@ad.altalang.com> Message-ID: <48F7768D.9000202@probo.com> Yoann Roman wrote: >> I'm really unclear why this should be used by any rational person, but >> if it works for you I see no reason not to use it. >> > > I guess I'm just irrational :-). I wouldn't use this for anything other > than Arial and Times New Roman, and it was solely to have the option of > generating PDFs similar to those that Acrobat creates by default. > The Adobe Distiller has ALWAYS produced PDF files that are smaller than any of its competition. I've used pdf995 and PDFCreator extensively, and although their results are good, the files are always bigger than Distiller. Are you using compression when you create your PDFs? That makes a big difference in size. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From andy at reportlab.com Thu Oct 16 14:38:24 2008 From: andy at reportlab.com (Andy Robinson) Date: Thu, 16 Oct 2008 19:38:24 +0100 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <48F7768D.9000202@probo.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> <002301c92f91$c9cda230$0502000a@ad.altalang.com> <48F7768D.9000202@probo.com> Message-ID: <956003ae0810161138o3ad10d98r21fc3ba7df50ae8f@mail.gmail.com> 2008/10/16 Tim Roberts : >> I guess I'm just irrational :-). I wouldn't use this for anything other >> than Arial and Times New Roman, and it was solely to have the option of >> generating PDFs similar to those that Acrobat creates by default. These are pretty much the equivalents of Helvetica and Times-Roman in the non-MS world, and for years if you distilled a Postscript file using the above two fonts, Adobe Reader would tell you that it was Helvetica, but also that it actually used Arial MT for display (or Times New Roman instead of Times Roman). I believe you will get exactly what you want - smallest, simplest PDFs with the fastest generation and no embedding - simply by using the font names 'Helvetica' and 'Times-Roman' in your project. You don't even need the font files on the server. - Andy -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From yroman-reportlab at altalang.com Thu Oct 16 18:38:14 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Thu, 16 Oct 2008 18:38:14 -0400 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <48F7768D.9000202@probo.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk><002301c92f91$c9cda230$0502000a@ad.altalang.com> <48F7768D.9000202@probo.com> Message-ID: <005701c92fdf$e07890a0$0502000a@ad.altalang.com> NOTE: I'm resending this since the list appears to have bounced it because of the attached PDFs. I've obviously offended the PDF gods by even suggesting this :-). To respond to everyone's questions... >From Robin... > my earlier suspicions are proved correct. Using more than the first > subset causes an error > > [snip] > > There may be some way to use unicode as the output format, but I don't > know enough about how adobe reader works with these non-embedded > system fonts to answer for sure. I don't think we should let this > patch go till we can get at least this primitive test to work. I ran similar tests with Acrobat, and it's doing more behind the scenes than it lets on. It switches to embedded subsets, regardless of the "Never Embed" list, if any non-CP1252 characters are used and for certain CP1252 characters. The latter seems to kick in at the 181 range but not for all 181 to 255 code points. I took another stab at my patch and got your test to pass. The trick was to return CP1252 codes in splitString instead of UTF-8 and to re-enable embedding if a CP1252 conversion wasn't possible. I also had to change addObjects to include the widths of all CP1252 characters used in a single subset, re-enable embedding if there was more than one subset, and specify the WinAnsiEncoding when not embedding. What I didn't like about it, though, is that, if the CP1252 conversion failed halfway through, there was no way to cleanly handle it. I could keep embedding info in the TTFont but there would be no way to go back and revert those CP1252 code points to UTF-8 code points. So I'm retracting my patch; it was an interesting exercise :-). >From Henning... > can you explain why you cannot follow the earlier recommendation to > use the built-in fonts (Helvetica, ...) instead? That's what I'll end up doing. I assume the only effect that would have is with Mac users that did have Arial. >From Tim... > Are you using compression when you create your PDFs? That makes a big > difference in size. I am. The difference is still pretty large, though. Examples attached [stripped]. Acrobat-Arial.pdf [43KB] and ReportLab-Arial.pdf [129KB] are the "same" document using all four variants of Arial, embedded. I'm on Acrobat 9 but had it generate a 1.3 PDF. ReportLab-Arial-Small.pdf [45KB] was with setting asciiReadable to 0; it's much smaller although I'm not sure I understand all the implications. -- Yoann Roman From andy at reportlab.com Fri Oct 17 02:31:14 2008 From: andy at reportlab.com (Andy Robinson) Date: Fri, 17 Oct 2008 07:31:14 +0100 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <005701c92fdf$e07890a0$0502000a@ad.altalang.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> <002301c92f91$c9cda230$0502000a@ad.altalang.com> <48F7768D.9000202@probo.com> <005701c92fdf$e07890a0$0502000a@ad.altalang.com> Message-ID: <956003ae0810162331i78d019c5sfa4c2d3ae2d5dda1@mail.gmail.com> 2008/10/16 Yoann Roman : > I ran similar tests with Acrobat, and it's doing more behind the scenes > than it lets on. It switches to embedded subsets, regardless of the > "Never Embed" list, if any non-CP1252 characters are used and for > certain CP1252 characters. The latter seems to kick in at the 181 range > but not for all 181 to 255 code points. Aha, that makes sense. I have no idea how many glyphs are supported in the fonts already in Adobe Reader, but if you step outside those, I guess it needs to embed any extra characters. > I am. The difference is still pretty large, though. Examples attached > [stripped]. Acrobat-Arial.pdf [43KB] and ReportLab-Arial.pdf [129KB] are > the "same" document using all four variants of Arial, embedded. I'm on > Acrobat 9 but had it generate a 1.3 PDF. >ReportLab-Arial-Small.pdf > [45KB] was with setting asciiReadable to 0; it's much smaller although > I'm not sure I understand all the implications. This does sound useful after all, as long as it's a new option which is off by default.. From robin at reportlab.com Fri Oct 17 05:09:08 2008 From: robin at reportlab.com (Robin Becker) Date: Fri, 17 Oct 2008 10:09:08 +0100 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <956003ae0810162331i78d019c5sfa4c2d3ae2d5dda1@mail.gmail.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> <002301c92f91$c9cda230$0502000a@ad.altalang.com> <48F7768D.9000202@probo.com> <005701c92fdf$e07890a0$0502000a@ad.altalang.com> <956003ae0810162331i78d019c5sfa4c2d3ae2d5dda1@mail.gmail.com> Message-ID: <48F85634.3060308@chamonix.reportlab.co.uk> Andy Robinson wrote: ......... >> "Never Embed" list, if any non-CP1252 characters are used and for >> certain CP1252 characters. The latter seems to kick in at the 181 range >> but not for all 181 to 255 code points. > I'm guessing that one or other of the standard encodings is being used for the first subset. It might be cp1252 or perhaps one of the other adobe standards eg winansi. > Aha, that makes sense. I have no idea how many glyphs are supported > in the fonts already in Adobe Reader, but if you step outside those, > I guess it needs to embed any extra characters. > >> I am. The difference is still pretty large, though. Examples attached >> [stripped]. Acrobat-Arial.pdf [43KB] and ReportLab-Arial.pdf [129KB] are >> the "same" document using all four variants of Arial, embedded. I'm on >> Acrobat 9 but had it generate a 1.3 PDF. >> ReportLab-Arial-Small.pdf >> [45KB] was with setting asciiReadable to 0; it's much smaller although >> I'm not sure I understand all the implications. asciiReadable just prepopulates the first subset with something which matches the ordinary ascii values. That means when you look at the pdf code in an editor many characters will be readable in the first subset. If you turn off asciiReadable then the subsets work more naturally and you only embed the glyphs which are used. For many applications that might be many fewer than the initial pre-population that we assume to make ascii readable. If a ttf font is on the never-embed list then presumably we can make the assumption that there's some initial subset (which we need to firm up) and then succeeding subsets are generated in the standard way. At object embedding time we just don't bother with the first subset. That would make the splitString mechanism work as before. What happens when these files are delivered to a platform that doesn't have the font? I notice that you appear to have attached some files to one of your emails, but I didn't see them come through. -- Robin Becker From yroman-reportlab at altalang.com Fri Oct 17 09:26:16 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Fri, 17 Oct 2008 09:26:16 -0400 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <48F85634.3060308@chamonix.reportlab.co.uk> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> <002301c92f91$c9cda230$0502000a@ad.altalang.com> <48F7768D.9000202@probo.com> <005701c92fdf$e07890a0$0502000a@ad.altalang.com><956003ae0810162331i78d019c5sfa4c2d3ae2d5dda1@mail.gmail.com> <48F85634.3060308@chamonix.reportlab.co.uk> Message-ID: <001001c9305b$eec42940$0502000a@ad.altalang.com> Robin Becker wrote... > I'm guessing that one or other of the standard encodings is being used > for the first subset. It might be cp1252 or perhaps one of the other > adobe standards eg winansi. It sets it to winansi. What's odd is that, according to the 1.3 spec, cp1252 code point 181 is in the winansi encoding, but using that character switches to embedded subsets (one winansi, the other "Identity-H"). > asciiReadable just prepopulates the first subset with something which > matches the ordinary ascii values. That means when you look at the pdf > code in an editor many characters will be readable in the first > subset. This sounds like something that would make debugging easier but isn't necessary otherwise. If that's the case, out of curiosity, why is it enabled by default? > If a ttf font is on the never-embed list then presumably we can make > the assumption that there's some initial subset (which we need to > firm up) and then succeeding subsets are generated in the standard > way. At object embedding time we just don't bother with the first > subset. That would make the splitString mechanism work as before. The issue I had with that approach was that, if Arial isn't embedded, Acrobat seems to want cp1252 code points instead of the UTF-8 code points that splitString returns. > What happens when these files are delivered to a platform that doesn't > have the font? I notice that you appear to have attached some files to > one of your emails, but I didn't see them come through. Not sure. Acrobat may have some built-in mapping for these or it could just rely on standard font substitution. The PDF examples I attached had Arial embedded and were all above the 40k max for the list, so my message bounced. I've attached Acrobat's "Standard" output, which does not embed Arial; I again knocked it down to 1.3, which increased the file size slightly from the default 1.6. Thanks, -- Yoann Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: Acrobat-Arial-Standard.pdf Type: application/pdf Size: 7497 bytes Desc: not available Url : From andy at reportlab.com Fri Oct 17 10:15:43 2008 From: andy at reportlab.com (Andy Robinson) Date: Fri, 17 Oct 2008 15:15:43 +0100 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <001001c9305b$eec42940$0502000a@ad.altalang.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> <002301c92f91$c9cda230$0502000a@ad.altalang.com> <48F7768D.9000202@probo.com> <005701c92fdf$e07890a0$0502000a@ad.altalang.com> <956003ae0810162331i78d019c5sfa4c2d3ae2d5dda1@mail.gmail.com> <48F85634.3060308@chamonix.reportlab.co.uk> <001001c9305b$eec42940$0502000a@ad.altalang.com> Message-ID: <956003ae0810170715k2d112406v286ffdc0e3344df8@mail.gmail.com> 2008/10/17 Yoann Roman : > Not sure. Acrobat may have some built-in mapping for these or it could > just rely on standard font substitution. The PDF examples I attached > had Arial embedded and were all above the 40k max for the list, so my > message bounced. Aha. I just increased the message limit to 100kb. We weren't trying to set anyone a file-size-reduction challenge, just using Mailman's defaults ;-) - Andy From jbauer at rubic.com Fri Oct 17 10:36:08 2008 From: jbauer at rubic.com (Jeff Bauer) Date: Fri, 17 Oct 2008 09:36:08 -0500 Subject: [reportlab-users] [PATCH] Add TTF Embedding Option In-Reply-To: <956003ae0810170715k2d112406v286ffdc0e3344df8@mail.gmail.com> References: <002e01c92ef9$2060d0c0$0502000a@ad.altalang.com> <48F7248B.4000809@chamonix.reportlab.co.uk> <002301c92f91$c9cda230$0502000a@ad.altalang.com> <48F7768D.9000202@probo.com> <005701c92fdf$e07890a0$0502000a@ad.altalang.com> <956003ae0810162331i78d019c5sfa4c2d3ae2d5dda1@mail.gmail.com> <48F85634.3060308@chamonix.reportlab.co.uk> <001001c9305b$eec42940$0502000a@ad.altalang.com> <956003ae0810170715k2d112406v286ffdc0e3344df8@mail.gmail.com> Message-ID: <48F8A2D8.7080201@rubic.com> Andy Robinson wrote: > 2008/10/17 Yoann Roman : >> Not sure. Acrobat may have some built-in mapping for these or it could >> just rely on standard font substitution. The PDF examples I attached >> had Arial embedded and were all above the 40k max for the list, so my >> message bounced. > > Aha. I just increased the message limit to 100kb. We weren't trying to set > anyone a file-size-reduction challenge, just using Mailman's defaults ;-) For larger files, there's always: http://www.filedropper.com/ -- Jeff Bauer Rubicon, Inc. From pmattingly at mail.csuchico.edu Fri Oct 17 20:24:42 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Fri, 17 Oct 2008 17:24:42 -0700 Subject: [reportlab-users] Multi-page formatting in Platypus In-Reply-To: <956003ae0810131521s40a4395atf876a17c3aff8422@mail.gmail.com> References: <956003ae0810131521s40a4395atf876a17c3aff8422@mail.gmail.com> Message-ID: "They must be defined either as callback functions passed to the PageTemplate's constructor" So I assume you mean that headers must be passed as a callback to the PageTemplate, rather than frames as you seem to imply. Fair enough. But, why aren't my frames being enscribed on the subsequent pages beyond the first? On Mon, Oct 13, 2008 at 3:21 PM, Andy Robinson wrote: > 2008/10/13 Peter Mattingly : > > > > > So: How do I define my frames across all of my pages? > > Headers like this don't go in frames. The frames are for the flowing > content. > They must be defined either as callback functions passed to the > PageTemplate's constructor, > which decorate the new page when it starts; or as subclasses of > PageTemplate which do > the same. Providing a generic "graphics callback" is far more > flexible; it lets you do > page borders, not just filling a box at the top or bottom like most > word processors. > > Look at some of the tests in tests/test_platypus_*.py, or in > tools/docco/rltemplate.py which is the template used for the manual. > > I admit the manual never explained this well; if someone can send in a > contrib for this for the Platypus chapter, we'd be really grateful. > > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmattingly at mail.csuchico.edu Fri Oct 17 21:03:48 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Fri, 17 Oct 2008 18:03:48 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: "But i our favour, we do have a broadly accurate user guide, the source to create it, and a ton of readable, working tests" Granted. As much as I harp on the lack of documentation, this documentation is miles above any other open source documentation I've ever seen; With the statistically anomolous exception of larger projects: Samba, Mplayer, Apache, etc; Which have financial backing in some fashion, for the most part. "The only workable solution is a community effort, which I have been pleading for on this list for years." Nerd's aren't good at writing, in general. Me being the exception. I had to work really hard to be as fluent with printed text as with words; To be fair I have an unfair advantage of being naturally pre-disposed to this type of discourse. "The source to the docs has been in every distro since launch until, oh, about 3 weeks ago (you have to use svn now). They are just Python scripts. This was our criterion for release 1." I didn't mean that this was the first I've heard of doc patching in *this* project, really in *any* project. Finding any dedicated effort to create documentation for anyone with an open source project is laudible. And asking for user input on documentation? I've never even heard of any dev *proposing* such; They'll just bang something together at the last minute, spelling, gramatically and factual errors included; Rife with "...this should be obvious..." and other wearisomly predictable and unhelpful catchisms that make their projects terrible to behold. So when I say "This was the first I've heard..." really it's worse than you thought. "If someone finds that the user guide doesn't explain something clearly enough, and has **an hour to spare**, it would be great if they could either (a) send in a **patch correcting or expanding it** (i.e. 20 lines to generate the right paragraphs in the guide); or (b) send in a **test script or teaching example**. We can review and check these things quickly." Emphasis mine. So you're saying: if I want to "patch" (e.g. revise or completely re-write from the ground up) a segment of documentation I have to send in code? Before I say anything more about that, let me quote from the user guide for a second: **The two attributes spaceBefore and spaceAfter do what they say**, except > at the top or bottom of a > frame. At the top of a frame, spaceBefore is ignored, and at the bottom, > spaceAfter is ignored. This > means that you could specify that a 'Heading2' style had two inches of > space before when it occurs in > mid-page, but will not get acres of whitespace at the top of a page. These > two attributes should be thought of > as 'requests' to the Frame and are not part of the space occupied by the > Paragraph itself. > > **The fontSize and fontName tags are obvious**, but it is important to set > the leading. This is the > spacing between adjacent lines of text; a good rule of thumb is to make > this 20% larger than the point size. > To get double-spaced text, use a high leading. If you set > autoLeading(default "off") to "min"(use > observed leading even if smaller than specified) or "max"(use the larger of > observed and specified) then an > attempt is made to determine the leading on a line by line basis. This may > be useful if the lines contain > different font sizes etc. (Page 62 of the user guide, section 6.1 ) "*The two attributes spaceBefore and spaceAfter do what they say"* Oh they do, do they? So in this context we're talking about Paragraphs and their associated style's correct? So a style would dictate certain properties of the Paragraph and the text they contain right? So *spaceBefore* and *spaceAfter * provide some variables for manipulating space having to deal with the paragraph; But what space? Perhaps spacing between letters in the text? Vertical space between paragraphs? Horizontal? Spacing between lines of the text in the paragraph? Something else? >From the rest of the text it's implied that this is padding within the frame surrounding the paragraph. You can see where some of my frustration comes from. Now here, I'll provide a little rewrite for the second case I've cited: The fontSize and fontName attributes, set size of the font being used (e.g. > size 12, 16, 20, etc) and the name of the font being used when creating text > (e.g. Times New Roman, Verdana, etc) respectively. > It isn't perfect and probably could use some revision and editing. But it's quite a lot better than "*The fontSize and fontName tags are obvious*". But in order to submit my revision I have to figure out how to embed it in Report Lab programming code? That's ridiculous. I'm currently a student learning how to do more with Report Labs, I'm not experienced enough with your conventions to create clean portable code. But at the same time, I'm able to revise and elucidate a section of the user manual with perfect clarity and a few minutes time. This would not be the case with programmtically creating a similar solution. If the time I've spent so far is any indication, such a project would require *multiple hours* of work to fully understand the entire process. I suspect I've found an inefficiency in the process of the community driven documentation you're trying to create. I can however make changes to a Wiki, which is a much simpler approach that others have taken to create community editable documents - including user documentation. The experience is akin to making a post on a forum or writing a letter, rather than programming. I would recommend Media Wiki (http://www.mediawiki.org/wiki/MediaWiki) which is used with Wikipedia. If that's too much administrative overhead (too much for me at least!), you can use any one of these others: http://en.wikipedia.org/wiki/Comparison_of_wiki_software Some of the better solutions are TiddlyWikiand DokuWiki for a simpler approach. I'm running DokuWiki and I'm very happy with it. I've heard nothing but good things about TiddlyWiki. Thank you for taking the time to talk with me about these issues. I hope to be of some help in the future. Report Labs is one of the few programmatically accesible methods I've found for creating highly formatted output for more than report creation; Which seems to be all that other techies seem to aspire their output to be. >< On Mon, Oct 13, 2008 at 11:24 PM, Andy Robinson wrote: > 2008/10/13 Peter Mattingly : > > You know what I mean though? Sufficient technical documentation is one > huge > > hurdle that OSS in general has to get over before any sort of general > (read: > > Non-maddeningly frustrating) adoption can take place. > > You're correct; it is a weakness. (But i our favour, we do have a > broadly accurate user > guide, the source to create it, and a ton of readable, working tests). > But it also > takes a heck of a lot of time - more than maintaining > the code does. It's not just documenting new features, it's constantly > pruning and editing everything which may be affected by a change. The only > workable solution is a community effort, which I have been pleading for on > this > list for years. > > > > > And...you can patch the docs? First I've heard of doing that... > > The source to the docs has been in every distro since launch until, > oh, about 3 weeks ago (you have to use svn now). They are just Python > scripts. This was our criterion for release 1. > > If someone finds that the user guide doesn't explain something clearly > enough, > and has an hour to spare, it would be great if they could either (a) send > in a patch correcting or expanding it (i.e. 20 lines to generate the right > paragraphs in the guide); or (b) send in a test script or teaching example. > We can review and check these things quickly. > > > Best Regards, > > -- > Andy Robinson > CEO/Chief Architect > ReportLab Europe Ltd. > 165 The Broadway, Wimbledon, London SW19 1NE, UK > Tel +44-20-8544-8049 > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmattingly at mail.csuchico.edu Fri Oct 17 22:22:53 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Fri, 17 Oct 2008 19:22:53 -0700 Subject: [reportlab-users] Multi-page formatting in Platypus In-Reply-To: <956003ae0810131521s40a4395atf876a17c3aff8422@mail.gmail.com> References: <956003ae0810131521s40a4395atf876a17c3aff8422@mail.gmail.com> Message-ID: > > tests/test_platypus_*.py > I'm using version 2.1 (the one available in the Ubuntu repositories), I have no directory named "tests" in my reportlab directories: /usr/share/doc/python-reportlab-doc /usr/share/doc/python-reportlab /usr/share/pyshared/reportlab There aren't any directories named "tests" on my system, related to reportlab. Any other places I should be looking? Should I be grabbing the "tests" from the SVN? tools/docco/rltemplate.py which is the template used for the manual. This I was able to find, where you said it would be. I'm at a loss where to look in this file, there's no comment labeled "Using a call back for the header here" or anything like that. No class definitions, no function definitions, etc. I did - however - see "Heading1" and "Heading2": if style == 'Title': > self.title = flowable.getPlainText() > elif style == 'Heading1': > self.chapter = flowable.getPlainText() > key = 'ch%d' % self.chapterNo > self.canv.bookmarkPage(key) > self.canv.addOutlineEntry(flowable.getPlainText(), > key, 0, 0) > self.chapterNo = self.chapterNo + 1 > self.sectionNo = 1 > elif style == 'Heading2': > self.section = flowable.text > key = 'ch%ds%d' % (self.chapterNo, self.sectionNo) > self.canv.bookmarkPage(key) > self.canv.addOutlineEntry(flowable.getPlainText(), > key, 1, 0) > self.sectionNo = self.sectionNo + 1 It doesn't look like this is what you're talking about. Then I looked for things that take PageTemplate's, which there were several: class FrontCoverTemplate(PageTemplate): > def __init__(self, id, pageSize=defaultPageSize): > self.pageWidth = pageSize[0] > self.pageHeight = pageSize[1] > frame1 = Frame(inch, > 3*inch, > self.pageWidth - 2*inch, > self.pageHeight - 518, id='cover') > PageTemplate.__init__(self, id, [frame1]) # note lack of onPage > > def afterDrawPage(self, canvas, doc): > canvas.saveState() > canvas.drawImage('../images/replogo.gif',2*inch, 8*inch) > > > canvas.setFont('Times-Roman', 10) > canvas.line(inch, 120, self.pageWidth - inch, 120) > > canvas.drawString(inch, 100, '165 The Broadway') > canvas.drawString(inch, 88, 'Wimbledon') > canvas.drawString(inch, 76, 'London SW19 1NE') > canvas.drawString(inch, 64, 'United Kingdom') > > canvas.restoreState() This seemed to be the closes to what you were talking about. Though again without some sort of pointer, comment or clue I don't see which of these commands actually relates to which sections of the page. Though I may be completely wrong. This file seems awfully short for a template for the entire manual. Do I have a the document you're thinking of? On Mon, Oct 13, 2008 at 3:21 PM, Andy Robinson wrote: > 2008/10/13 Peter Mattingly : > > > > > So: How do I define my frames across all of my pages? > > Headers like this don't go in frames. The frames are for the flowing > content. > They must be defined either as callback functions passed to the > PageTemplate's constructor, > which decorate the new page when it starts; or as subclasses of > PageTemplate which do > the same. Providing a generic "graphics callback" is far more > flexible; it lets you do > page borders, not just filling a box at the top or bottom like most > word processors. > > Look at some of the tests in tests/test_platypus_*.py, or in > tools/docco/rltemplate.py which is the template used for the manual. > > I admit the manual never explained this well; if someone can send in a > contrib for this for the Platypus chapter, we'd be really grateful. > > - Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmattingly at mail.csuchico.edu Sat Oct 18 00:43:43 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Fri, 17 Oct 2008 21:43:43 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: I've been prosecuting this little flame war with Roberto Alsina, in the background. Personally I don't see his issues and I think he's wrong, but I believe I should be more concise and perhaps apologize for my tone. I do apologize if the tone of my reply made it seem if I was insulting anyone. I certainly didn't intend that! I was just upset at a corollary condition. I would like to see the documentation submission process streamlined in some fashion, I believe that writing programmatic constructs is too much to ask for simple changes in language. Though I do see the point for examples, teaching code, etc. I mention Wiki's because I believe they would be a good solution to the problem of making the documentation more community oriented and would lower the bar for submissions. I *certainly* did *not* mean to imply anything negative by offering my opinion on wiki's! I think that point of Roberto's was pretty bizzarre, but I wanted to cover it anyway in case anyone got the wrong idea. --Peter On Mon, Oct 13, 2008 at 11:24 PM, Andy Robinson wrote: > 2008/10/13 Peter Mattingly : > > You know what I mean though? Sufficient technical documentation is one > huge > > hurdle that OSS in general has to get over before any sort of general > (read: > > Non-maddeningly frustrating) adoption can take place. > > You're correct; it is a weakness. (But i our favour, we do have a > broadly accurate user > guide, the source to create it, and a ton of readable, working tests). > But it also > takes a heck of a lot of time - more than maintaining > the code does. It's not just documenting new features, it's constantly > pruning and editing everything which may be affected by a change. The only > workable solution is a community effort, which I have been pleading for on > this > list for years. > > > > > And...you can patch the docs? First I've heard of doing that... > > The source to the docs has been in every distro since launch until, > oh, about 3 weeks ago (you have to use svn now). They are just Python > scripts. This was our criterion for release 1. > > If someone finds that the user guide doesn't explain something clearly > enough, > and has an hour to spare, it would be great if they could either (a) send > in a patch correcting or expanding it (i.e. 20 lines to generate the right > paragraphs in the guide); or (b) send in a test script or teaching example. > We can review and check these things quickly. > > > Best Regards, > > -- > Andy Robinson > CEO/Chief Architect > ReportLab Europe Ltd. > 165 The Broadway, Wimbledon, London SW19 1NE, UK > Tel +44-20-8544-8049 > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralsina at netmanagers.com.ar Sat Oct 18 07:24:43 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Sat, 18 Oct 2008 08:24:43 -0300 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: <200810180824.53523.ralsina@netmanagers.com.ar> On Saturday 18 October 2008 01:43:43 Peter Mattingly wrote: > I would like to see the documentation submission process streamlined in > some fashion, I believe that writing programmatic constructs is too much to > ask for simple changes in language.? Though I do see the point for > examples, teaching code, etc. > > I mention Wiki's because I believe they would be a good solution to the > problem of making the documentation more community oriented and would lower > the bar for submissions.? I certainly did not mean to imply anything > negative by offering my opinion on wiki's! > > I think that point of Roberto's was pretty bizzarre, but I wanted to cover > it anyway in case anyone got the wrong idea. You are right. Rereading your original post, the part about wikis is perhaps the more reasonable one. I was just tired of eating snarkiness for 50 paragraphs and let that colour my perception. As you said: "Nerd's aren't good at writing, in general.? Me being the exception." -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan From adam at flossmanuals.net Sat Oct 18 21:53:01 2008 From: adam at flossmanuals.net (adam hyde) Date: Sat, 18 Oct 2008 21:53:01 -0400 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: <1224381181.6368.152.camel@esetera> hi Would you consider using FLOSS Manuals for the docs? We have a good system in place, and we use Reportlab to gen the PDF for print ready source: http://www.flossmanuals.net adam On Fri, 2008-10-17 at 18:03 -0700, Peter Mattingly wrote: > "But i our favour, we do have a broadly accurate user guide, the > source to create it, and a ton of readable, working tests" > > > Granted. As much as I harp on the lack of documentation, this > documentation is miles above any other open source documentation I've > ever seen; With the statistically anomolous exception of larger > projects: Samba, Mplayer, Apache, etc; Which have financial backing in > some fashion, for the most part. > > "The only workable solution is a community effort, which I have been > pleading for on this list for years." > > > Nerd's aren't good at writing, in general. Me being the exception. I > had to work really hard to be as fluent with printed text as with > words; To be fair I have an unfair advantage of being naturally > pre-disposed to this type of discourse. > > "The source to the docs has been in every distro since launch until, > oh, about 3 weeks ago (you have to use svn now). They are just Python > scripts. This was our criterion for release 1." > > > I didn't mean that this was the first I've heard of doc patching in > *this* project, really in *any* project. Finding any dedicated effort > to create documentation for anyone with an open source project is > laudible. And asking for user input on documentation? I've never > even heard of any dev *proposing* such; They'll just bang something > together at the last minute, spelling, gramatically and factual errors > included; Rife with "...this should be obvious..." and other > wearisomly predictable and unhelpful catchisms that make their > projects terrible to behold. So when I say "This was the first I've > heard..." really it's worse than you thought. > > "If someone finds that the user guide doesn't explain something > clearly enough, and has *an hour to spare*, it would be great if they > could either (a) send in a *patch correcting or expanding it* (i.e. 20 > lines to generate the right paragraphs in the guide); or (b) send in a > *test script or teaching example*. We can review and check these > things quickly." > > > Emphasis mine. So you're saying: if I want to "patch" (e.g. revise or > completely re-write from the ground up) a segment of documentation I > have to send in code? Before I say anything more about that, let me > quote from the user guide for a second: > > *The two attributes spaceBefore and spaceAfter do what they > say*, except at the top or bottom of a > frame. At the top of a frame, spaceBefore is ignored, and at > the bottom, spaceAfter is ignored. This > means that you could specify that a 'Heading2' style had two > inches of space before when it occurs in > mid-page, but will not get acres of whitespace at the top of a > page. These two attributes should be thought of > as 'requests' to the Frame and are not part of the space > occupied by the Paragraph itself. > > *The fontSize and fontName tags are obvious*, but it is > important to set the leading. This is the > spacing between adjacent lines of text; a good rule of thumb > is to make this 20% larger than the point size. > To get double-spaced text, use a high leading. If you set > autoLeading(default "off") to "min"(use > observed leading even if smaller than specified) or "max"(use > the larger of observed and specified) then an > attempt is made to determine the leading on a line by line > basis. This may be useful if the lines contain > different font sizes etc. > (Page 62 of the user guide, section 6.1 ) > > > "The two attributes spaceBefore and spaceAfter do what they say" > > Oh they do, do they? > > So in this context we're talking about Paragraphs and their associated > style's correct? So a style would dictate certain properties of the > Paragraph and the text they contain right? So spaceBefore and > spaceAfter provide some variables for manipulating space having to > deal with the paragraph; But what space? Perhaps spacing between > letters in the text? Vertical space between paragraphs? Horizontal? > Spacing between lines of the text in the paragraph? Something else? > > From the rest of the text it's implied that this is padding within the > frame surrounding the paragraph. > > You can see where some of my frustration comes from. > > Now here, I'll provide a little rewrite for the second case I've > cited: > > The fontSize and fontName attributes, set size of the font > being used (e.g. size 12, 16, 20, etc) and the name of the > font being used when creating text (e.g. Times New Roman, > Verdana, etc) respectively. > > It isn't perfect and probably could use some revision and editing. > But it's quite a lot better than "The fontSize and fontName tags are > obvious". But in order to submit my revision I have to figure out how > to embed it in Report Lab programming code? That's ridiculous. > > I'm currently a student learning how to do more with Report Labs, I'm > not experienced enough with your conventions to create clean portable > code. But at the same time, I'm able to revise and elucidate a > section of the user manual with perfect clarity and a few minutes > time. This would not be the case with programmtically creating a > similar solution. If the time I've spent so far is any indication, > such a project would require *multiple hours* of work to fully > understand the entire process. I suspect I've found an inefficiency > in the process of the community driven documentation you're trying to > create. > > I can however make changes to a Wiki, which is a much simpler approach > that others have taken to create community editable documents - > including user documentation. The experience is akin to making a post > on a forum or writing a letter, rather than programming. > > I would recommend Media Wiki (http://www.mediawiki.org/wiki/MediaWiki) > which is used with Wikipedia. If that's too much administrative > overhead (too much for me at least!), you can use any one of these > others: > > http://en.wikipedia.org/wiki/Comparison_of_wiki_software > > Some of the better solutions are TiddlyWiki and DokuWiki for a simpler > approach. I'm running DokuWiki and I'm very happy with it. I've > heard nothing but good things about TiddlyWiki. > > Thank you for taking the time to talk with me about these issues. I > hope to be of some help in the future. Report Labs is one of the few > programmatically accesible methods I've found for creating highly > formatted output for more than report creation; Which seems to be all > that other techies seem to aspire their output to be. >< > > > On Mon, Oct 13, 2008 at 11:24 PM, Andy Robinson > wrote: > 2008/10/13 Peter Mattingly : > > You know what I mean though? Sufficient technical > documentation is one huge > > hurdle that OSS in general has to get over before any sort > of general (read: > > Non-maddeningly frustrating) adoption can take place. > > > You're correct; it is a weakness. (But i our favour, we do > have a > broadly accurate user > guide, the source to create it, and a ton of readable, working > tests). > But it also > takes a heck of a lot of time - more than maintaining > the code does. It's not just documenting new features, it's > constantly > pruning and editing everything which may be affected by a > change. The only > workable solution is a community effort, which I have been > pleading for on this > list for years. > > > > > And...you can patch the docs? First I've heard of doing > that... > > > The source to the docs has been in every distro since launch > until, > oh, about 3 weeks ago (you have to use svn now). They are > just Python > scripts. This was our criterion for release 1. > > If someone finds that the user guide doesn't explain something > clearly enough, > and has an hour to spare, it would be great if they could > either (a) send > in a patch correcting or expanding it (i.e. 20 lines to > generate the right > paragraphs in the guide); or (b) send in a test script or > teaching example. > We can review and check these things quickly. > > > Best Regards, > > -- > Andy Robinson > CEO/Chief Architect > ReportLab Europe Ltd. > 165 The Broadway, Wimbledon, London SW19 1NE, UK > Tel +44-20-8544-8049 > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > > > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From adam at flossmanuals.net Sun Oct 19 13:08:36 2008 From: adam at flossmanuals.net (adam hyde) Date: Sun, 19 Oct 2008 13:08:36 -0400 Subject: [reportlab-users] manual proposal Message-ID: <1224436116.6368.176.camel@esetera> hi, If there is interest in putting together a manual on Reportlab then I'm as keen as mustard to help get one going. We have a community of free documentation writers at FLOSS Manuals and a tool set that enables the ease of production, translation and output to online (via an embedded manual api) or book form. If there is anyone wanting to lead this initiative I will start and empty manual and you can get going. I will help as much as you need if you need to know how the tool set works etc. We also have a manual on how it all works: http://www.flossmanuals.net/flossmanuals adam -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From andy at reportlab.com Sun Oct 19 17:25:00 2008 From: andy at reportlab.com (Andy Robinson) Date: Sun, 19 Oct 2008 22:25:00 +0100 Subject: [reportlab-users] manual proposal In-Reply-To: <1224436116.6368.176.camel@esetera> References: <1224436116.6368.176.camel@esetera> Message-ID: <956003ae0810191425p523bd547xf2c8f5a99be400ff@mail.gmail.com> 2008/10/19 adam hyde : > hi, > > If there is interest in putting together a manual on Reportlab then I'm > as keen as mustard to help get one going. We have a community of free > documentation writers at FLOSS Manuals and a tool set that enables the > ease of production, translation and output to online (via an embedded > manual api) or book form. Adam, thanks very much for this. However, the problem isn't the tools, it's finding people who are willing to go through the existing manual making bits friendlier, correcting holes and inaccuracies, and adding some new examples. Your site looks great and I am sure fills a big need. But It would be quite sad for a publishing tool like ours to move away from being able to publish its own manuals (unless you use ReportLab to make PDFs?). ReportLab's core business is helping clients publish content, and we have all the tools we need, as well as a roadmap which should sync with Python's own documentation one day (we hope to move to ReST). The problem is finding people willing to spend time mainatining our open source documentation. Best Regards, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From andy at reportlab.com Sun Oct 19 17:34:58 2008 From: andy at reportlab.com (Andy Robinson) Date: Sun, 19 Oct 2008 22:34:58 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <1224381181.6368.152.camel@esetera> References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> <1224381181.6368.152.camel@esetera> Message-ID: <956003ae0810191434m569f115eu48fc9820ce158c55@mail.gmail.com> 2008/10/19 adam hyde : > hi > > Would you consider using FLOSS Manuals for the docs? > > We have a good system in place, and we use Reportlab to gen the PDF for > print ready source: > http://www.flossmanuals.net Adam, sorry, I only just saw this second message. Since you're using our library, it's a lot more interesting. I'll try to take a look.... - Andy From andy at reportlab.com Sun Oct 19 18:26:27 2008 From: andy at reportlab.com (Andy Robinson) Date: Sun, 19 Oct 2008 23:26:27 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: <956003ae0810191526r2ad9bd98pac4d27af3e7307a8@mail.gmail.com> 2008/10/18 Peter Mattingly : > Vertical space between paragraphs? That's the one. But you're the first person who has ever questioned this one. While I accept that we do not have a clear explanation of "how to make documents with Platypus", > I'm currently a student learning how to do more with Report Labs, I'm not > experienced enough with your conventions to create clean portable code. But > at the same time, I'm able to revise and elucidate a section of the user > manual with perfect clarity and a few minutes time. Peter, you just haven't looked at the manual source. The relevant source code look like this: ---trunk/src/docs/userguide/ch5_paragraphs.py line 87 ---- disc("""The two attributes $spaceBefore$ and $spaceAfter$ do what they say, except at the top or bottom of a frame. At the top of a frame, $spaceBefore$ is ignored, and at the bottom, $spaceAfter$ is ignored. This means that you could specify that a 'Heading2' style had two inches of space before when it occurs in mid-page, but will not get acres of whitespace at the top of a page. These two attributes should be thought of as 'requests' to the Frame and are not part of the space occupied by the Paragraph itself.""") ----------------------------------------- I know it's weird but Roberto's RST2PDF didn't exist in 2000 when we reached our "version 1" criterion of being able to create our own manual. But it is NOT hard to suggest a concrete amendment, or open one of the scripts and rewrite a few paragraphs; and you can check it isn't broken and regenerate your own userguide in 2 seconds flat. -- Moving forwards, I hope we'll end up with the documentation properly versioned in ReST, and be able to make both HTML docs on the site and PDF via our own libraries and (probably) RST2PDF. Once we can publish them to HTML, it will be fairly easy to allow 'comment this page' functionality like the Django folks did. A 'snippets' site would be really cool too, as long as people could add screenshots or output samples. But all this takes time. The critical factor is still time. We make NO money from our open source code, and even if we got 100x more users, we would still make no money. Therefore we can't put large amounts of senior staff time into updating our open source docs. We can, however, quickly accept specific revisions or contributions, however worded or submitted. You don't have take the word "patch" too literally - if someone sent in a text file attempting to explain Platypus a bit better, or a specific list of corrections, we'd happily check it in. Best Regards, Andy From ralsina at netmanagers.com.ar Sun Oct 19 19:40:49 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Sun, 19 Oct 2008 21:40:49 -0200 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810191526r2ad9bd98pac4d27af3e7307a8@mail.gmail.com> References: <956003ae0810191526r2ad9bd98pac4d27af3e7307a8@mail.gmail.com> Message-ID: <200810192140.56790.ralsina@netmanagers.com.ar> On Sunday 19 October 2008 20:26:27 Andy Robinson wrote: > 2008/10/18 Peter Mattingly : > > Vertical space between paragraphs? > > That's the one. But you're the first person who has ever questioned > this one. While I accept that we do not have a clear explanation of > "how to make documents with Platypus", > > > I'm currently a student learning how to do more with Report Labs, I'm not > > experienced enough with your conventions to create clean portable code. > > But at the same time, I'm able to revise and elucidate a section of the > > user manual with perfect clarity and a few minutes time. > > Peter, you just haven't looked at the manual source. > The relevant source code look like this: > > ---trunk/src/docs/userguide/ch5_paragraphs.py line 87 ---- > > disc("""The two attributes $spaceBefore$ and $spaceAfter$ do what they > say, except at the top or bottom of a frame. At the top of a frame, > $spaceBefore$ is ignored, and at the bottom, $spaceAfter$ is ignored. > This means that you could specify that a 'Heading2' style had two > inches of space before when it occurs in mid-page, but will not > get acres of whitespace at the top of a page. These two attributes > should be thought of as 'requests' to the Frame and are not part > of the space occupied by the Paragraph itself.""") > > ----------------------------------------- > I know it's weird but Roberto's RST2PDF didn't exist in 2000 when we > reached our "version 1" criterion of being able to create our own manual. > But it is NOT hard to suggest a concrete amendment, or open one of the > scripts and rewrite a few paragraphs; and you can check it isn't broken and > regenerate your own userguide in 2 seconds flat. Maybe I can figure out a way to convert the current manual into rst somehow. Then it could be hooked into a rst-supporting wiki. Of course it would then require lots of preoofreading. I may take a look this week (no promises, sadly). -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at flossmanuals.net Sun Oct 19 22:34:24 2008 From: adam at flossmanuals.net (adam hyde) Date: Sun, 19 Oct 2008 22:34:24 -0400 Subject: [reportlab-users] manual proposal In-Reply-To: <956003ae0810191425p523bd547xf2c8f5a99be400ff@mail.gmail.com> References: <1224436116.6368.176.camel@esetera> <956003ae0810191425p523bd547xf2c8f5a99be400ff@mail.gmail.com> Message-ID: <1224470064.6926.59.camel@esetera> hey Andy, As I said in my email - We use Reportlab to make PDF...infact we use reportlab to make books: http://en.flossmanuals.net/bookstore adam On Sun, 2008-10-19 at 22:25 +0100, Andy Robinson wrote: > 2008/10/19 adam hyde : > > hi, > > > > If there is interest in putting together a manual on Reportlab then I'm > > as keen as mustard to help get one going. We have a community of free > > documentation writers at FLOSS Manuals and a tool set that enables the > > ease of production, translation and output to online (via an embedded > > manual api) or book form. > > > Adam, thanks very much for this. However, the problem isn't the tools, > it's finding people who are willing to go through the existing manual > making bits friendlier, correcting holes and inaccuracies, and adding some > new examples. > > Your site looks great and I am sure fills a big need. But It would be quite > sad for a publishing tool like ours to move away from being able to > publish its own > manuals (unless you use ReportLab to make PDFs?). ReportLab's core > business is helping clients publish content, and we have all the tools we > need, as well as a roadmap which should sync with Python's own documentation > one day (we hope to move to ReST). The problem is finding people willing > to spend time mainatining our open source documentation. > > > > Best Regards, > > > > -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From gherman at darwin.in-berlin.de Mon Oct 20 04:16:05 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Mon, 20 Oct 2008 10:16:05 +0200 Subject: [reportlab-users] manual proposal In-Reply-To: <1224436116.6368.176.camel@esetera> References: <1224436116.6368.176.camel@esetera> Message-ID: <5C7A4FD4-42D3-488F-99D1-5FCBF6248E14@darwin.in-berlin.de> adam hyde: > If there is interest in putting together a manual on Reportlab then > I'm > as keen as mustard to help get one going. We have a community of free > documentation writers at FLOSS Manuals and a tool set that enables the > ease of production, translation and output to online (via an embedded > manual api) or book form. I think the ReportLab community would greatly benefit from such a project, and it would be extremely interesting to see how far it gets without ReportLab Ltd. being in control of every period inside the text, but only acting as a "source of wisdom". > If there is anyone wanting to lead this initiative I will start and > empty manual and you can get going. I will help as much as you need if > you need to know how the tool set works etc. We also have a manual on > how it all works: > http://www.flossmanuals.net/flossmanuals This looks already impressive, and it would be even more if I could find out more quickly on your site what is actually used as the standard input format. Also, after very quickly looking at some PDFs I noticed that a few of them had no title on their first page except something like "flossmanuals", which is slightly confusing. And you might also have to explain what it would mean to "lead this initiative". Adam, in your place, if it took me only about 15 minutes to set it up, I would just go for it, set it free and see what happens. Regards, Dinu -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at flossmanuals.net Mon Oct 20 04:31:05 2008 From: adam at flossmanuals.net (adam hyde) Date: Mon, 20 Oct 2008 04:31:05 -0400 Subject: [reportlab-users] manual proposal In-Reply-To: <5C7A4FD4-42D3-488F-99D1-5FCBF6248E14@darwin.in-berlin.de> References: <1224436116.6368.176.camel@esetera> <5C7A4FD4-42D3-488F-99D1-5FCBF6248E14@darwin.in-berlin.de> Message-ID: <1224491465.6926.97.camel@esetera> hi, > > Adam, in your place, if it took me only about 15 minutes > to set it up, I would just go for it, set it free and see > what happens. > I have a great respect for Reportlab and I would prefer first to have the blessing of Reportlab insiders. Also, we have one form of PDF that is not output using reportlab. I will change this if it is a pre-requisite for reportlab to have the docs hosted on FLOSS Manuals. However before I do this it would be good to get a 'go ahead' from the reportlab team. This is not just an issue of respect but in my experience the documentation often gets more use and is much more thorough and trusted if it has the blessing and/or involvement of the dev team. adam > > Regards, > > > Dinu > > -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From gherman at darwin.in-berlin.de Mon Oct 20 04:43:41 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Mon, 20 Oct 2008 10:43:41 +0200 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: Peter Mattingly: > [...] So you're saying: if I want to "patch" (e.g. revise or > completely re-write from the ground up) a segment of documentation I > have to send in code? So true, in fact! I haven't seen it so clearly before. It's kind of a blocker to ask people for code in order to document the code. And I'm saying this as someone who normally works with self-referential concepts in my tech- nical writing and software development. > I'm currently a student learning how to do more with Report Labs, > I'm not experienced enough with your conventions to create clean > portable code. But at the same time, I'm able to revise and > elucidate a section of the user manual with perfect clarity and a > few minutes time. This would not be the case with programmtically > creating a similar solution. If the time I've spent so far is any > indication, such a project would require *multiple hours* of work to > fully understand the entire process. I suspect I've found an > inefficiency in the process of the community driven documentation > you're trying to create. > > I can however make changes to a Wiki, which is a much simpler > approach that others have taken to create community editable > documents - including user documentation. The experience is akin to > making a post on a forum or writing a letter, rather than programming. Very well explained! Wikis have been suggested repeatedly starting as long as eight years ago, maybe. And from my point of view the situation hasn't changed. ReportLab Ltd. still cultivates its fear and wrong perceptions of losing control over its baby. As long as this remains an emotional issue rather than a technical one, it is hard to see any perspective on real progress towards a development (and documentation) process which actually does significantly involve the community. One way out of this in the Open Source world would be a fork of the project - this is not a suggestion, but a re- minder. I hope it's not going to happen, but maybe this is also just another useless fear. Regards, Dinu From andy at reportlab.com Mon Oct 20 04:56:25 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 20 Oct 2008 09:56:25 +0100 Subject: [reportlab-users] manual proposal In-Reply-To: <1224491465.6926.97.camel@esetera> References: <1224436116.6368.176.camel@esetera> <5C7A4FD4-42D3-488F-99D1-5FCBF6248E14@darwin.in-berlin.de> <1224491465.6926.97.camel@esetera> Message-ID: <956003ae0810200156v5e00b40ds2911e60d0b4b7bb9@mail.gmail.com> 2008/10/20 adam hyde : > I have a great respect for Reportlab and I would prefer first to have > the blessing of Reportlab insiders. > > Also, we have one form of PDF that is not output using reportlab. I will > change this if it is a pre-requisite for reportlab to have the docs > hosted on FLOSS Manuals. However before I do this it would be good to > get a 'go ahead' from the reportlab team. In principle it sounds great. We'll review in a team meeting today. First, some questions for Adam and everybody else.... (1) To everyone: should it start with a "port" of the existing user guide, with volunteers copying and pasting? Or would a completely fresh start be best? (2) right now we have vector diagrams drawn with snippets of ReportLab code within our PDF manuals. In principle, with some reworking, these could be generated both as bitmaps and as vectors within the PDF copies, with a directory in SVN to contain the diagram scripts. Adam, would you be OK with trying to extend your toolchain to use these, with some help from us? Or does every one of your manuals have to share exactly the same toolchain? (3) is there any mechanism to sync or export the flossmanuals source into text that can be committed into SVN? One of our biggest and best "tests" is whether the manuals generate OK; and it would be a bit weird trying to keep directories of examples and diagrams synced with a web app in a remote repository, rather than just running "genuserguide.py" every night as we do now. (4) Adam, would you be willing to privately share some of your PDF-building code with us so we can help make sure it has all the best features? This would pay off for all of your manuals, of course. - Andy From haraldarminmassa at gmail.com Mon Oct 20 05:00:42 2008 From: haraldarminmassa at gmail.com (Harald Armin Massa) Date: Mon, 20 Oct 2008 11:00:42 +0200 Subject: [reportlab-users] manual proposal In-Reply-To: <956003ae0810200156v5e00b40ds2911e60d0b4b7bb9@mail.gmail.com> References: <1224436116.6368.176.camel@esetera> <5C7A4FD4-42D3-488F-99D1-5FCBF6248E14@darwin.in-berlin.de> <1224491465.6926.97.camel@esetera> <956003ae0810200156v5e00b40ds2911e60d0b4b7bb9@mail.gmail.com> Message-ID: <7be3f35d0810200200h7170e3abr8fda2acb07b9682c@mail.gmail.com> > (1) To everyone: should it start with a "port" of the existing user > guide, with volunteers > copying and pasting? Or would a completely fresh start be best? Successfull "Fresh starts" are a myth, like Santa Claus or the Tooth Fairy. Better port what is existant, and refactor where appropriate. Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Spielberger Stra?e 49 70435 Stuttgart 0173/9409607 no fx, no carrier pigeon - EuroPython 2009 will take place in Birmingham - Stay tuned! From adam at flossmanuals.net Mon Oct 20 05:10:33 2008 From: adam at flossmanuals.net (adam hyde) Date: Mon, 20 Oct 2008 05:10:33 -0400 Subject: [reportlab-users] manual proposal In-Reply-To: <956003ae0810200156v5e00b40ds2911e60d0b4b7bb9@mail.gmail.com> References: <1224436116.6368.176.camel@esetera> <5C7A4FD4-42D3-488F-99D1-5FCBF6248E14@darwin.in-berlin.de> <1224491465.6926.97.camel@esetera> <956003ae0810200156v5e00b40ds2911e60d0b4b7bb9@mail.gmail.com> Message-ID: <1224493833.6926.109.camel@esetera> hi, > > In principle it sounds great. We'll review in a team meeting today. great! > First, some > questions for Adam and everybody else.... > > (1) To everyone: should it start with a "port" of the existing user > guide, with volunteers > copying and pasting? Or would a completely fresh start be best? > I leave this one for others to comment on. > (2) right now we have vector diagrams drawn with snippets of ReportLab code > within our PDF manuals. In principle, with some reworking, these could > be generated both as bitmaps and as vectors within the PDF copies, > with a directory in SVN to contain the diagram scripts. > Adam, would you be OK with trying to extend your toolchain to use these, > with some help from us? Or does every one of your manuals have to > share exactly the same toolchain? > Our input is WYSIWYG, and we keep everything in xhtml. To integrate a method for script inclusions might be a little tricky in this environment. Using already rendered bitmaps is not a problem of course. > (3) is there any mechanism to sync or export the flossmanuals source > into text that can be committed into SVN? One of our biggest and best > "tests" is whether the manuals generate OK; and it would be a bit > weird trying to keep directories of examples and diagrams synced > with a web app in a remote repository, rather than just running > "genuserguide.py" every night as we do now. we can work something out. what would be your preferred format? xhtml good enough? > > (4) Adam, would you be willing to privately share some of your PDF-building > code with us so we can help make sure it has all the best features? This > would pay off for all of your manuals, of course. > Well, we currently use plain vanilla reportlab and Pisa. We made some changes in Pisa and submitted the patches to Dirk. So I have nothing to forward to you except your own code ;) You can see the tool that outputs our PDF here: http://en.flossmanuals.net/bin/objavi Its really just sucks up the xhtml sources, collates it, and runs it through Pisa with a predefined css. Thats it. adam > > - Andy -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From volker.haas at brainbot.com Mon Oct 20 08:47:06 2008 From: volker.haas at brainbot.com (Volker Haas) Date: Mon, 20 Oct 2008 14:47:06 +0200 Subject: [reportlab-users] bug with image transparency?! Message-ID: <48FC7DCA.40001@brainbot.com> Hi, I guess I just ran into an image which is not rendered correctly using reportlab (version 2.1). All black pixels are rendered white (or transparent on a white background). The image displays correctly in a browser or image viewer. This is what PIL tells me about the image: In [1]: from PIL import Image In [2]: img = Image.open('MergeSampleStep1.png') In [3]: img.mode Out[3]: 'P' In [4]: img.info Out[4]: {'Software': 'Paint.NET v3.35', 'gamma': 0.45455000000000001, 'transparency': 255} Sample code: from reportlab.platypus import BaseDocTemplate, PageTemplate, Frame, Image from reportlab.rl_config import defaultPageSize doc = BaseDocTemplate("test.pdf") frame = Frame(0,0,defaultPageSize[0], defaultPageSize[1]) doc.addPageTemplates(PageTemplate(frames=frame)) Story = [Image("MergeSampleStep1.png")] doc.build(Story) -- volker haas brainbot technologies ag fon +49 6131 2116394 boppstra?e 64 fax +49 6131 2116392 55118 mainz volker.haas at brainbot.com http://www.brainbot.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: MergeSampleStep1.png Type: image/png Size: 14540 bytes Desc: not available Url : From volker.haas at brainbot.com Mon Oct 20 09:55:04 2008 From: volker.haas at brainbot.com (Volker Haas) Date: Mon, 20 Oct 2008 15:55:04 +0200 Subject: [reportlab-users] manual proposal In-Reply-To: <1224436116.6368.176.camel@esetera> References: <1224436116.6368.176.camel@esetera> Message-ID: <48FC8DB8.4020002@brainbot.com> An HTML attachment was scrubbed... URL: From andy at reportlab.com Mon Oct 20 10:16:58 2008 From: andy at reportlab.com (Andy Robinson) Date: Mon, 20 Oct 2008 15:16:58 +0100 Subject: [reportlab-users] manual proposal In-Reply-To: <48FC8DB8.4020002@brainbot.com> References: <1224436116.6368.176.camel@esetera> <48FC8DB8.4020002@brainbot.com> Message-ID: <956003ae0810200716k70062b3la94552821944cf94@mail.gmail.com> 2008/10/20 Volker Haas : > Hi all, > I would like to point out another option of generating reportlab manuals. I > am one of the developers of the pediapress team and we built (and are still > extending and improving) a library to parse and output MediaWiki articles as > PDFs. The PDF export is done with reportlab - other output options are odf, > xml and xhtml. Multiple articles can be combined into a book by using the > Collection extension (mediawiki extension). Wow, we're spoilt for choice. This is another project I regret I just didn't have time to catch up with. The third choice, and what I was aiming for, is Sphinx/docutils/rst2pdf. If we help Roberto get rst2pdf working well enough that (a) we can use ReST in subversion and generate all outputs, and (b) the Python language itself could drop their current route to PDF and use our Python tools too. But it would be wrong for us to embark on something needing development if a good solution exists too. - Andy From ralsina at netmanagers.com.ar Mon Oct 20 10:23:45 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Mon, 20 Oct 2008 12:23:45 -0200 Subject: [reportlab-users] manual proposal In-Reply-To: <956003ae0810200716k70062b3la94552821944cf94@mail.gmail.com> References: <1224436116.6368.176.camel@esetera> <48FC8DB8.4020002@brainbot.com> <956003ae0810200716k70062b3la94552821944cf94@mail.gmail.com> Message-ID: <200810201223.46473.ralsina@netmanagers.com.ar> On Monday 20 October 2008 12:16:58 Andy Robinson wrote: > 2008/10/20 Volker Haas : > > Hi all, > > I would like to point out another option of generating reportlab manuals. > > I am one of the developers of the pediapress team and we built (and are > > still extending and improving) a library to parse and output MediaWiki > > articles as PDFs. The PDF export is done with reportlab - other output > > options are odf, xml and xhtml. Multiple articles can be combined into a > > book by using the Collection extension (mediawiki extension). > > Wow, we're spoilt for choice. This is another project I regret I just > didn't have time to catch up with. > > The third choice, and what I was aiming for, is Sphinx/docutils/rst2pdf. > If we help Roberto get rst2pdf working well enough that (a) we can use ReST > in subversion and generate all outputs, and (b) the Python language itself > could drop their current route to PDF and use our Python tools too. But it > would be wrong for us to embark on something needing development if a good > solution exists too. I have contacted the sphinx group about it a while ago, and there was interest but it fizzled. I did manage to make it work, somewhat, but someone who understands sphinx would need to take a look, because I don't want to start any more projects nowadays[1]. Anyway, if I may offer a suggestion: just keep your options open. Don't embark on anything that locks you in. I see you are already on that path, with the requirement of being able to host the docs on your repo and that they be in a "reasonable" format. The chance to be able to link doc revisions to code revisions and bug issues is very important. [1] Totally offtopic, but I am in a sort of funk regarding open source. The "what's the point" kind. It took me 15 years to get to it, but it came hard. -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at flossmanuals.net Mon Oct 20 11:05:40 2008 From: adam at flossmanuals.net (adam hyde) Date: Mon, 20 Oct 2008 11:05:40 -0400 Subject: [reportlab-users] manual proposal In-Reply-To: <200810201223.46473.ralsina@netmanagers.com.ar> References: <1224436116.6368.176.camel@esetera> <48FC8DB8.4020002@brainbot.com> <956003ae0810200716k70062b3la94552821944cf94@mail.gmail.com> <200810201223.46473.ralsina@netmanagers.com.ar> Message-ID: <1224515140.6392.15.camel@esetera> hey FLOSS Manuals is a community of documentation writers, as well as a place to go to write manuals. Its designed for documentation writing and the promotion of the documentation. FM outputs to multiple formats, including an embed api for hosting manuals on your own site, pdf for book formatted pdf (controlled by css) for print on demand, PDF for download, and downloadable html in zip or tar. We also have deb packaging coming up so manuals can be installed using apt (this material will be in the default Ubuntu repositories). we can probably export to a format of your choice with a bit of dev for the svn sync however the manuals would be hosted on the flossmanuals site as that is the toolset and the focus of the community. if you want the manuals on your own server then it would be best to go with the mediawiki option. adam On Mon, 2008-10-20 at 12:23 -0200, Roberto Alsina wrote: > On Monday 20 October 2008 12:16:58 Andy Robinson wrote: > > > 2008/10/20 Volker Haas : > > > > Hi all, > > > > I would like to point out another option of generating reportlab > manuals. > > > > I am one of the developers of the pediapress team and we built > (and are > > > > still extending and improving) a library to parse and output > MediaWiki > > > > articles as PDFs. The PDF export is done with reportlab - other > output > > > > options are odf, xml and xhtml. Multiple articles can be combined > into a > > > > book by using the Collection extension (mediawiki extension). > > > > > > Wow, we're spoilt for choice. This is another project I regret I > just > > > didn't have time to catch up with. > > > > > > The third choice, and what I was aiming for, is > Sphinx/docutils/rst2pdf. > > > If we help Roberto get rst2pdf working well enough that (a) we can > use ReST > > > in subversion and generate all outputs, and (b) the Python language > itself > > > could drop their current route to PDF and use our Python tools too. > But it > > > would be wrong for us to embark on something needing development if > a good > > > solution exists too. > > I have contacted the sphinx group about it a while ago, and there was > interest but it fizzled. I did manage to make it work, somewhat, but > someone who understands sphinx would need to take a look, because I > don't want to start > > any more projects nowadays[1]. > > Anyway, if I may offer a suggestion: just keep your options open. > Don't embark on anything that locks you in. I see you are already on > that path, with the requirement of being able to host the docs on your > repo and that they be in a "reasonable" format. > > The chance to be able to link doc revisions to code revisions and bug > issues is very important. > > [1] Totally offtopic, but I am in a sort of funk regarding open > source. The > > "what's the point" kind. It took me 15 years to get to it, but it came > hard. > > -- > > ("\''/").__..-''"`-. . Roberto Alsina > > `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) > > (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar > > _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia > > (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) > > Debugging is twice as hard as writing the code in the first place. > > Therefore, if you write the code as cleverly as possible, you are, > > by definition, not smart enough to debug it. --Brian W. Kernighan > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From timr at probo.com Mon Oct 20 13:27:14 2008 From: timr at probo.com (Tim Roberts) Date: Mon, 20 Oct 2008 10:27:14 -0700 Subject: [reportlab-users] bug with image transparency?! In-Reply-To: <48FC7DCA.40001@brainbot.com> References: <48FC7DCA.40001@brainbot.com> Message-ID: <48FCBF72.1090605@probo.com> Volker Haas wrote: > > I guess I just ran into an image which is not rendered correctly using > reportlab (version 2.1). > All black pixels are rendered white (or transparent on a white > background). > The image displays correctly in a browser or image viewer. > ... > from reportlab.platypus import BaseDocTemplate, PageTemplate, Frame, > Image > from reportlab.rl_config import defaultPageSize > > doc = BaseDocTemplate("test.pdf") > > frame = Frame(0,0,defaultPageSize[0], defaultPageSize[1]) > doc.addPageTemplates(PageTemplate(frames=frame)) > > Story = [Image("MergeSampleStep1.png")] > doc.build(Story) Very interesting; I think there is some confusion in the code between Platypus and canvas about what the "mask" parameter means. In the short term, you can work around this by saying: Story = [Image("MergeSampleStep1.png", mask=None)] At least, that fixed your sample for me. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From paul.barrass at safeonlinebilling.com Mon Oct 20 21:03:56 2008 From: paul.barrass at safeonlinebilling.com (Paul Barrass) Date: Tue, 21 Oct 2008 02:03:56 +0100 Subject: [reportlab-users] Paragraph "Hack" Message-ID: <48FD2A7C.4060404@safeonlinebilling.com> Hi List, After years of trouble-free use of ReportLab, I've come across a couple of issues. It appears that _rl_accel is no longer available as a "stand alone" download - the daily snapshot seems to be missing some setup files (setup.py being notable in it's absence). Is this the case, or have I missed something? I've upgraded to ReportLab 2.2, and I'm having visual problems with Paragraphs. There is a border around the top of the text of the paragraph in earlier versions (I was previously using 2.1), which is not there in 2.2. I'm using Paragraphs with background colours and the text is now touching the top of the box forming the background. I know there is a 'borderWidth' attribute, but that gives an unsatisfactory result, as the border is added to all four sides to the Paragraph, meaning it becomes too wide and the border at the bottom is too large with any sensible leading. Looking to the source, I've found that cur_y = self.height - f.fontSize has become cur_y = self.height - getattr(f,'ascent',f.fontSize) #TODO fix XPreformatted to remove this hack Reversing this change returns the Paragraph to it's old behaviour, but I'm not sure what it breaks in XPreformatted. Has anybody else experienced this issue or know if my workaround won't lead to Bad Things happening? Thanks, Paul Barrass. From gustavohc at gmail.com Tue Oct 21 02:46:59 2008 From: gustavohc at gmail.com (Gustavo Henrique Cervi) Date: Tue, 21 Oct 2008 04:46:59 -0200 Subject: [reportlab-users] javascript Message-ID: <48FD7AE3.5050801@gmail.com> An HTML attachment was scrubbed... URL: From mukkablues at hotmail.it Tue Oct 21 03:38:04 2008 From: mukkablues at hotmail.it (giulia cherubini) Date: Tue, 21 Oct 2008 09:38:04 +0200 Subject: [reportlab-users] allow multiline text Message-ID: Hello, i?m new in reportlab and also in programming python, I have little sample of a report made with reportlab It takes text from query made with postgres-psycopg2 It puts it onto a grid (attach1) or a simple canvas.drawLine(attach2) But when the text it is too long, it goes ???outside the paper??? (attach1) or over the text beside (attach2) Does some way ? method exists to allow my text to go in the line below after a tot. number of letters? For example: NAME SURNAME CITY Giulia cherubini roma Antonguido cherubini roma ? in that case, in the pdf the name will be write over surname I?m searching for: NAME SURNAME CITY Giulia cherubini roma Anton cherubini roma ? in that case, the text will be write in another line automatically guido sorry for my poor english i hope I explain in correct way thanx in advance giulia _________________________________________________________________ Comunica, gioca e divertiti con i tuoi amici su Messenger! http://www.messenger.it -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: attach1.pdf Type: application/pdf Size: 4953 bytes Desc: not available Url : -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: attach1_.py Url: -------------- next part -------------- A non-text attachment was scrubbed... Name: attach2.pdf Type: application/pdf Size: 4045 bytes Desc: not available Url : -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: attach2_.py Url: From H.vonBargen at t-p.com Tue Oct 21 03:51:19 2008 From: H.vonBargen at t-p.com (Henning von Bargen) Date: Tue, 21 Oct 2008 09:51:19 +0200 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: Message-ID: <77A9E75DA75C564D82BDC4B18A7D8525305623@ROHRPOSTIX.tup.ads> > > I've upgraded to ReportLab 2.2, and I'm having visual problems with > Paragraphs. There is a border around the top of the text of the > paragraph in earlier versions (I was previously using 2.1), > which is not > there in 2.2. I'm using Paragraphs with background colours > and the text > is now touching the top of the box forming the background. I > know there > is a 'borderWidth' attribute, but that gives an > unsatisfactory result, > as the border is added to all four sides to the Paragraph, meaning it > becomes too wide and the border at the bottom is too large with any > sensible leading. > > Looking to the source, I've found that > > cur_y = self.height - f.fontSize > > has become > > cur_y = self.height - > getattr(f,'ascent',f.fontSize) > #TODO fix XPreformatted to remove this hack > > Reversing this change returns the Paragraph to it's old > behaviour, but > I'm not sure what it breaks in XPreformatted. > > Has anybody else experienced this issue or know if my > workaround won't > lead to Bad Things happening? > > Thanks, > Paul Barrass. > I noticed the same effect. On another (but similar) topic, I'd like to mention that the "leading" attribute in the Paragraph implementation differs from its usual meaning: According to Wikipedia, in type-setting, "leading" is the inter-line distance (such that line_height = ascent + descent + leading), whereas in ReportLab, "leading" is the same as line_height, AFAIK. A clear definition of the box-model in the documentation would help a lot, in particular for the case of different fonts in the paragraph, for the spacing between the lines of the same paragraph, for the spacing between different paragraph instances and for the the spacing between the paragraph and the frame or other flowables. Unfortunately I cannot provide one myself, 'cause I dont fully understand the way it's supposed to work. Henning From robin at reportlab.com Tue Oct 21 05:14:19 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 21 Oct 2008 10:14:19 +0100 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <48FD2A7C.4060404@safeonlinebilling.com> References: <48FD2A7C.4060404@safeonlinebilling.com> Message-ID: <48FD9D6B.90402@chamonix.reportlab.co.uk> Paul Barrass wrote: ........... > > cur_y = self.height - f.fontSize > > has become > > cur_y = self.height - getattr(f,'ascent',f.fontSize) > #TODO fix XPreformatted to remove this hack > > Reversing this change returns the Paragraph to it's old behaviour, but > I'm not sure what it breaks in XPreformatted. > > Has anybody else experienced this issue or know if my workaround won't > lead to Bad Things happening? ....... The hack here was that when this change was first made we hadn't yet propagated the ascent attribute to XPreformatteds so f.ascent could fail. Probably we should be using the ascent here, but I'm not enough of a typographer to say definitely. What you seem to be saying is that we should allow for variable padding. We seem to draw the background around the paragraph as a whole. I'm sure that makes sense in visual terms. -- Robin Becker From robin at reportlab.com Tue Oct 21 05:29:06 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 21 Oct 2008 10:29:06 +0100 Subject: [reportlab-users] bug with image transparency?! In-Reply-To: <48FCBF72.1090605@probo.com> References: <48FC7DCA.40001@brainbot.com> <48FCBF72.1090605@probo.com> Message-ID: <48FDA0E2.10008@chamonix.reportlab.co.uk> Tim Roberts wrote: > Volker Haas wrote: >> I guess I just ran into an image which is not rendered correctly using >> reportlab (version 2.1). >> All black pixels are rendered white (or transparent on a white >> background). >> The image displays correctly in a browser or image viewer. >> ... >> from reportlab.platypus import BaseDocTemplate, PageTemplate, Frame, >> Image >> from reportlab.rl_config import defaultPageSize >> >> doc = BaseDocTemplate("test.pdf") >> >> frame = Frame(0,0,defaultPageSize[0], defaultPageSize[1]) >> doc.addPageTemplates(PageTemplate(frames=frame)) >> >> Story = [Image("MergeSampleStep1.png")] >> doc.build(Story) > > Very interesting; I think there is some confusion in the code between > Platypus and canvas about what the "mask" parameter means. In the short > term, you can work around this by saying: > > Story = [Image("MergeSampleStep1.png", mask=None)] > > At least, that fixed your sample for me. > At present we're not dealing with mode 'P' correctly. We're able to deal with RGBA CMYK L and RGB. Currently stuff that is in mode P will be converted to RGB. My reading of the PIL manual suggests that mode P is a palette format with the actual colour space any of the others. It seems that conversions to L RGB and CMYK are supported without loss and that the way to convert is to omit the outcome mode argument. I assume that we would then need to carry the transparent colour along as a singleton as in with a mask colour. Can you send me a small sample image? -- Robin Becker From paul.barrass at safeonlinebilling.com Tue Oct 21 06:16:31 2008 From: paul.barrass at safeonlinebilling.com (Paul Barrass) Date: Tue, 21 Oct 2008 11:16:31 +0100 Subject: [reportlab-users] allow multiline text In-Reply-To: References: Message-ID: <48FDABFF.50901@safeonlinebilling.com> giulia cherubini wrote: > > > It puts it onto a grid (attach1) or a simple canvas.drawLine(attach2) > > But when the text it is too long, it goes ???outside the paper??? > (attach1) or over the text beside (attach2) > > Does some way ? method exists to allow my text to go in the line below > after a tot. number of letters? > The way I do this is to use a Table (as you have done in your attach1), but wrap each cell of the Table within in a Paragraph. The Paragraph has logic for splitting the text onto multiple lines. If you're dealing with lots of cells, you may wish to consider only using the Paragraph for cells likely to be long, as there is a small overhead with the Paragraph, and there's no point taking the hit if you don't need to. Alternatively, if you wish to split the text yourself, just use a newline (\n) in the text - this forces a line break. Paul Barrass. From andy at reportlab.com Tue Oct 21 06:32:22 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 21 Oct 2008 11:32:22 +0100 Subject: [reportlab-users] javascript In-Reply-To: <48FD7AE3.5050801@gmail.com> References: <48FD7AE3.5050801@gmail.com> Message-ID: <956003ae0810210332h77daf370ja3015ff3832c1e6f@mail.gmail.com> 2008/10/21 Gustavo Henrique Cervi : > Is there a way to embed javascript code inside pdf? > We have not created any APIs to do it with our library. It should be pretty easy and we'd be happy to accept contributions in this area, but ReportLab's own needs tend towards PDF as a "final output" format so it is not high on our own team's radar. Best Regards, Andy Robinson From andy at reportlab.com Tue Oct 21 06:45:02 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 21 Oct 2008 11:45:02 +0100 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <48FD2A7C.4060404@safeonlinebilling.com> References: <48FD2A7C.4060404@safeonlinebilling.com> Message-ID: <956003ae0810210345l285d00ddqcb867ead415614ba@mail.gmail.com> 2008/10/21 Paul Barrass : > Hi List, > > After years of trouble-free use of ReportLab, I've come across a couple of > issues. > > It appears that _rl_accel is no longer available as a "stand alone" download > - the daily snapshot seems to be missing some setup files (setup.py being > notable in it's absence). Is this the case, or have I missed something? We did a repository rearrangement recently at the request of what we perceived was the majority of the community. It's possible we broke or changed the daily snapshots and we'll take a look. _rl_accel and _renderPM are in subversion and in the 2.2 tar.gz files under src/rl_addons. The idea is to have them in the main reportlab distros, and thus prebuilt in any Windows installers, or built by "setup.py install" for those with a compiler. > > I've upgraded to ReportLab 2.2, and I'm having visual problems with > Paragraphs. I can't offer an immediate answer but have ensured both issues are logged in our tracker: https://admin.reportlab.com/mantis/project/core/tracker/ We'll ensure we work through this soon. Best Regards, Andy From paul.barrass at safeonlinebilling.com Tue Oct 21 06:44:46 2008 From: paul.barrass at safeonlinebilling.com (Paul Barrass) Date: Tue, 21 Oct 2008 11:44:46 +0100 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <48FD9D6B.90402@chamonix.reportlab.co.uk> References: <48FD2A7C.4060404@safeonlinebilling.com> <48FD9D6B.90402@chamonix.reportlab.co.uk> Message-ID: <48FDB29E.9060206@safeonlinebilling.com> Robin Becker wrote: > > The hack here was that when this change was first made we hadn't yet > propagated the ascent attribute to XPreformatteds so f.ascent could fail. > Hi. Thanks for your response. Do you know if this change to XPreformatted has now been made? I personally prefer the "old" behaviour, so I'd like to know if reverting the change locally is "safe". > Probably we should be using the ascent here, but I'm not enough of a > typographer to say definitely. What you seem to be saying is that we > should allow for variable padding. We seem to draw the background > around the paragraph as a whole. I'm sure that makes sense in visual > terms. The problem I'm experiencing (which is probably totally unrelated to the "right" way of doing things) is that the text of the Paragraph has visually moved from being v_aligned middle to being v_aligned top. This leads to the text touching the top of the box, and leaving empty space at the bottom, which can be relatively large where leading > font_height (which it usually is, at least by a few points). The HTML/CSS "padding-top" variable padding would certainly solve the problem, though that seems overkill to fix something I initially thought was just a temporary hack on someone's TODO list - that'll teach me never to read comments again ;) If it's not clear what I'm referring to, I can try to produce a "before and after" to demonstrate. Thanks again, Paul Barrass. From paul.barrass at safeonlinebilling.com Tue Oct 21 07:03:40 2008 From: paul.barrass at safeonlinebilling.com (Paul Barrass) Date: Tue, 21 Oct 2008 12:03:40 +0100 Subject: [reportlab-users] _rl_accel [was Paragraph "Hack"] In-Reply-To: <956003ae0810210345l285d00ddqcb867ead415614ba@mail.gmail.com> References: <48FD2A7C.4060404@safeonlinebilling.com> <956003ae0810210345l285d00ddqcb867ead415614ba@mail.gmail.com> Message-ID: <48FDB70C.8090702@safeonlinebilling.com> Andy Robinson wrote: > 2008/10/21 Paul Barrass : > >> It appears that _rl_accel is no longer available as a "stand alone" download >> - the daily snapshot seems to be missing some setup files (setup.py being >> notable in it's absence). Is this the case, or have I missed something? >> > > We did a repository rearrangement recently at the request of what we > perceived was the majority of the community. It's possible we broke > or changed the daily snapshots and we'll take a look. > > _rl_accel and _renderPM are in subversion and in the 2.2 tar.gz files > under src/rl_addons. The idea is to have them in the main reportlab > distros, and thus prebuilt in any Windows installers, or built by > "setup.py install" for those with a compiler. > Hi, Thanks for getting back to me. I've noticed that the addons form part of the package (which is why I upgraded to 2.2 and found the Paragraph problem....), which I think is a good move, especially if it means the distro's will start to include it in their package management. If maintaining separate setup files for the "stand alone" addons isn't practical now that it's officially part of the package, then making the last revision pre-rearrangement available could be arranged to help out people still using older versions? Thanks, Paul Barrass. From robin at reportlab.com Tue Oct 21 07:10:37 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 21 Oct 2008 12:10:37 +0100 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <48FDB29E.9060206@safeonlinebilling.com> References: <48FD2A7C.4060404@safeonlinebilling.com> <48FD9D6B.90402@chamonix.reportlab.co.uk> <48FDB29E.9060206@safeonlinebilling.com> Message-ID: <48FDB8AD.7030402@chamonix.reportlab.co.uk> Paul Barrass wrote: ....... > The problem I'm experiencing (which is probably totally unrelated to the > "right" way of doing things) is that the text of the Paragraph has > visually moved from being v_aligned middle to being v_aligned top. This > leads to the text touching the top of the box, and leaving empty space > at the bottom, which can be relatively large where leading > font_height > (which it usually is, at least by a few points). The HTML/CSS > "padding-top" variable padding would certainly solve the problem, though > that seems overkill to fix something I initially thought was just a > temporary hack on someone's TODO list - that'll teach me never to read > comments again ;) > > If it's not clear what I'm referring to, I can try to produce a "before > and after" to demonstrate. ...... I know exactly what the change did. In the old way of doing things we assumed (without justification) that the baseline was fontSize below the top of the text. ascender-------------------------- ^ A | fontSize | | baseline-------------------------- | 0.2*fontSize | y descender------------------------- Now we attempt to improve matters by using the actual ascent and descent to specify the ascender and descender lines. In addition there's the leading which is supposed to be larger than ascender - descender. I assume that you're seeing a visual difference because your fontSize is larger than the ascent. There was never any intention to visually vertically centre anything, western fonts are by nature not vertically symmetric. If you adjust this locally all that will happen is that XPreformatteds will also be adjusted by your reversion. However, your change to the initial y will not change the internal way that the lines are spaced ie most of the code will continue to use ascent and descent. My impression is that if we could allow you to adjust the top/bottom padding you could achieve the visual style that is required. Currently borderPadding is a singleton. That would not alter the exact positioning of the paragraph topline though. -- Robin Becker From andy at reportlab.com Tue Oct 21 07:31:45 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 21 Oct 2008 12:31:45 +0100 Subject: [reportlab-users] _rl_accel [was Paragraph "Hack"] In-Reply-To: <48FDB70C.8090702@safeonlinebilling.com> References: <48FD2A7C.4060404@safeonlinebilling.com> <956003ae0810210345l285d00ddqcb867ead415614ba@mail.gmail.com> <48FDB70C.8090702@safeonlinebilling.com> Message-ID: <956003ae0810210431l43f87016o8a3708d9cf7cc199@mail.gmail.com> 2008/10/21 Paul Barrass : > If maintaining separate setup files for the "stand alone" addons isn't > practical now that it's officially part of the package, then making the last > revision pre-rearrangement available could be arranged to help out people > still using older versions? It's all still there in http://www.reportlab.org/ftp/ I think the main setup script should build the extensions, but it's possible there were bugs fixed in SVN since 2.2. We're hoping to get a new release out soon which corrects the things we 'learned' from our 2.2 rearrangement. - Andy From paul.barrass at safeonlinebilling.com Tue Oct 21 07:44:06 2008 From: paul.barrass at safeonlinebilling.com (Paul Barrass) Date: Tue, 21 Oct 2008 12:44:06 +0100 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <48FDB8AD.7030402@chamonix.reportlab.co.uk> References: <48FD2A7C.4060404@safeonlinebilling.com> <48FD9D6B.90402@chamonix.reportlab.co.uk> <48FDB29E.9060206@safeonlinebilling.com> <48FDB8AD.7030402@chamonix.reportlab.co.uk> Message-ID: <48FDC086.4040305@safeonlinebilling.com> Robin Becker wrote: > ...... > I know exactly what the change did. In the old way of doing things we > assumed (without justification) that the baseline was fontSize below > the top of the text. > > > Now we attempt to improve matters by using the actual ascent and > descent to specify the ascender and descender lines. In addition > there's the leading which is supposed to be larger than ascender - > descender. I assume that you're seeing a visual difference because > your fontSize is larger than the ascent. There was never any > intention to visually vertically centre anything, western fonts are by > nature not vertically symmetric. If you adjust this locally all that > will happen is that XPreformatteds will also be adjusted by your > reversion. However, your change to the initial y will not change the > internal way that the lines are spaced ie most of the code will > continue to use ascent and descent. > Thanks for the explanation. It appears that the new method is working perfectly in that it's achieving what is it that you set out to do. Unfortunately for me, this means you're unlikely to "fix" it.. ;) > My impression is that if we could allow you to adjust the top/bottom > padding you could achieve the visual style that is required. Currently > borderPadding is a singleton. That would not alter the exact > positioning of the paragraph topline though. If I could specify a padding of 2-3pt at the top without that forcing extra padding on the other sides that would solve my problem perfectly. I'm not in any great rush for a fix though, the production servers will be on 2.1 for the foreseeable future. Thanks again, Paul Barrass. From volker.haas at brainbot.com Tue Oct 21 07:56:42 2008 From: volker.haas at brainbot.com (Volker Haas) Date: Tue, 21 Oct 2008 13:56:42 +0200 Subject: [reportlab-users] bug with image transparency?! In-Reply-To: <48FDA0E2.10008@chamonix.reportlab.co.uk> References: <48FC7DCA.40001@brainbot.com> <48FCBF72.1090605@probo.com> <48FDA0E2.10008@chamonix.reportlab.co.uk> Message-ID: <48FDC37A.80704@brainbot.com> Robin Becker wrote: > Tim Roberts wrote: >> In the short >> term, you can work around this by saying: >> >> Story = [Image("MergeSampleStep1.png", mask=None)] >> >> At least, that fixed your sample for me. >> Thanks for that hint Tim, I'll see if that works for me > Can you send me a small sample image? Robin, there should be a sample image attached to my first mail Regards, Volker -- volker haas brainbot technologies ag fon +49 6131 2116394 boppstra?e 64 fax +49 6131 2116392 55118 mainz volker.haas at brainbot.com http://www.brainbot.com/ From paul.barrass at safeonlinebilling.com Tue Oct 21 07:59:05 2008 From: paul.barrass at safeonlinebilling.com (Paul Barrass) Date: Tue, 21 Oct 2008 12:59:05 +0100 Subject: [reportlab-users] _rl_accel [was Paragraph "Hack"] In-Reply-To: <956003ae0810210431l43f87016o8a3708d9cf7cc199@mail.gmail.com> References: <48FD2A7C.4060404@safeonlinebilling.com> <956003ae0810210345l285d00ddqcb867ead415614ba@mail.gmail.com> <48FDB70C.8090702@safeonlinebilling.com> <956003ae0810210431l43f87016o8a3708d9cf7cc199@mail.gmail.com> Message-ID: <48FDC409.6090200@safeonlinebilling.com> Andy Robinson wrote: > 2008/10/21 Paul Barrass : > >> If maintaining separate setup files for the "stand alone" addons isn't >> practical now that it's officially part of the package, then making the last >> revision pre-rearrangement available could be arranged to help out people >> still using older versions? >> > > It's all still there in http://www.reportlab.org/ftp/ > > I think the main setup script should build the extensions, but it's possible > there were bugs fixed in SVN since 2.2. > The 2.2 package builds the extensions without any problems, at least on my system. The daily snapshot of the extensions (for use with pre-2.2 versions, which didn't come with the extensions) no longer (as far as I can tell) contain the setup files, probably because they've been rolled into the package setup files for 2.2. I was just suggesting that rather than maintain two seperate setup environments (one for standalone, one for the package) it may have been more convenient to leave an older version of the extensions (before the setup was moved into the package) on the FTP for pre-2.2 users. Of course, if the setup files could make their way back into the snapshots, that would probably be better. Paul Barrass. From robin at reportlab.com Tue Oct 21 08:38:21 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 21 Oct 2008 13:38:21 +0100 Subject: [reportlab-users] bug with image transparency?! In-Reply-To: <48FDC37A.80704@brainbot.com> References: <48FC7DCA.40001@brainbot.com> <48FCBF72.1090605@probo.com> <48FDA0E2.10008@chamonix.reportlab.co.uk> <48FDC37A.80704@brainbot.com> Message-ID: <48FDCD3D.6060102@chamonix.reportlab.co.uk> Volker Haas wrote: ........ > Robin, there should be a sample image attached to my first mail ...... yes I'm being stupid today. -- Robin Becker From gherman at darwin.in-berlin.de Tue Oct 21 11:04:05 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Tue, 21 Oct 2008 17:04:05 +0200 Subject: [reportlab-users] ANN: pdfgrid 0.1.0 Message-ID: <5A2D461D-8325-49C0-BE79-E54127E9E5CC@darwin.in-berlin.de> Hi, I've quickly hacked together a tool duplicating one function of PageCatcher, namely overlaying grids on existing PDF pages. It's named pdfgrid and clearly has some more room for addi- tional features, which I'm going to address in future re- leases. http://pypi.python.org/pypi/pdfgrid Here's part of the README: Pdfgrid is a Python command-line tool and module for adding a regular grid on top of all pages of an existing PDF document. It will mostly be used for measuring indi- vidual parts of PDF pages like graphics or paragraph widths. For the time being, only a rectangular grid with major and minor lines is supported, and their colour and line widths can be set individually. NOTE: This is an initial release. The API is likely to change and for the time being the grid size is limited to A4, but this will change in future releases. The source distribution contains some somple files and grided versions of them. Regards, Dinu -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Tue Oct 21 11:10:15 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 21 Oct 2008 16:10:15 +0100 Subject: [reportlab-users] ANN: pdfgrid 0.1.0 In-Reply-To: <5A2D461D-8325-49C0-BE79-E54127E9E5CC@darwin.in-berlin.de> References: <5A2D461D-8325-49C0-BE79-E54127E9E5CC@darwin.in-berlin.de> Message-ID: <956003ae0810210810m303ba426qaa1bb194998db8c3@mail.gmail.com> 2008/10/21 Dinu Gherman : > http://pypi.python.org/pypi/pdfgrid > Here's part of the README: Great work! It's really useful for people to have a "measuring tool" like this. - Andy From andy at reportlab.com Tue Oct 21 12:05:01 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 21 Oct 2008 17:05:01 +0100 Subject: [reportlab-users] manual proposal In-Reply-To: <1224515140.6392.15.camel@esetera> References: <1224436116.6368.176.camel@esetera> <48FC8DB8.4020002@brainbot.com> <956003ae0810200716k70062b3la94552821944cf94@mail.gmail.com> <200810201223.46473.ralsina@netmanagers.com.ar> <1224515140.6392.15.camel@esetera> Message-ID: <956003ae0810210905o41df7abblc5b6bfaa1b08039f@mail.gmail.com> 2008/10/20 adam hyde : > however the manuals would be hosted on the flossmanuals site as that is > the toolset and the focus of the community. > > if you want the manuals on your own server then it would be best to go > with the mediawiki option. We've discussed this internally and decided that we really want to keep our documentation in our repository. Right now it can all be built and kept in sync with the code, and we already had plans to make this better, and to put it up in HTML and allow comments and so on using a Django-powered site we are building. Also, we want to improve the PDF output to showcase more advanced features that only we have - for example, the first place anyone is likely to see a really easy-to-use table of contents widget should be in our manuals, as we'll be needing it. This will let folks like you, MediaWiki and others pick up new features from us easily in future. Tools are not the problem. We'd much rather hack on tools than try to rewrite tutorial content - just like everyone else here ;-) I am also not convinced yet that the "community" would produce coherently edited manuals. Aiming for the odd rewritten section and a mechanism to collect and tag snippets and sample scripts (like ActiveState or DjangoSnippets) seems more realistic to me, and that's where we hope to be in 3 months time. Many thanks for the offers of help, though, and I wish you the best. We're also hoping to put up some pages of projects using ReportLab, and both FLOSSManuals and MediaWiki are great examples. - Andy From adam at flossmanuals.net Tue Oct 21 12:13:11 2008 From: adam at flossmanuals.net (adam hyde) Date: Tue, 21 Oct 2008 12:13:11 -0400 Subject: [reportlab-users] manual proposal In-Reply-To: <956003ae0810210905o41df7abblc5b6bfaa1b08039f@mail.gmail.com> References: <1224436116.6368.176.camel@esetera> <48FC8DB8.4020002@brainbot.com> <956003ae0810200716k70062b3la94552821944cf94@mail.gmail.com> <200810201223.46473.ralsina@netmanagers.com.ar> <1224515140.6392.15.camel@esetera> <956003ae0810210905o41df7abblc5b6bfaa1b08039f@mail.gmail.com> Message-ID: <1224605591.6393.88.camel@esetera> hey Andy, Many thanks for the feedback. Your concerns about coherent docs being produced by the community is understandable but unwarranted. I suggest you look at the manuals on FLOSS Manuals, for example this: http://en.flossmanuals.net/sugar was written by about 30 people - not the developers, but a community of people with an interest in creating clear documentation. If there is anyone that is interested in writing a community generated user manual then the FLOSS Manuals repository is available to you. I will set up a manual if there is someone that wishes to commit to taking the lead in writing it. adam On Tue, 2008-10-21 at 17:05 +0100, Andy Robinson wrote: > 2008/10/20 adam hyde : > > however the manuals would be hosted on the flossmanuals site as that is > > the toolset and the focus of the community. > > > > if you want the manuals on your own server then it would be best to go > > with the mediawiki option. > > We've discussed this internally and decided that we really want to keep > our documentation in our repository. Right now it can all be built and > kept in sync with the code, and we already had plans to make this > better, and to put it up in HTML and allow comments and so on using > a Django-powered site we are building. > > Also, we want to improve the PDF output to showcase more advanced > features that only we have - for example, the first place anyone is likely > to see a really easy-to-use table of contents widget should be in our > manuals, as we'll be needing it. This will let folks like you, MediaWiki and > others pick up new features from us easily in future. > > Tools are not the problem. We'd much rather hack on tools than > try to rewrite tutorial content - just like everyone else here ;-) I am > also not convinced yet that the "community" would produce coherently > edited manuals. Aiming for the odd rewritten section and a mechanism > to collect and tag snippets and sample scripts (like ActiveState or > DjangoSnippets) seems more realistic to me, and that's where we > hope to be in 3 months time. > > Many thanks for the offers of help, though, and I wish you the best. > We're also hoping to put up some pages of projects using ReportLab, > and both FLOSSManuals and MediaWiki are great examples. > > > - Andy -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From yroman-reportlab at altalang.com Tue Oct 21 12:34:05 2008 From: yroman-reportlab at altalang.com (Yoann Roman) Date: Tue, 21 Oct 2008 12:34:05 -0400 Subject: [reportlab-users] ActionFlowable in _Container Message-ID: <006501c9339a$d51c4670$0502000a@ad.altalang.com> I'm using custom _Container subclasses for my report generation and came across a bug where _Container doesn't "execute" ActionFlowables if they don't get split out. I can't see a reason ActionFlowables can't be inside a container, and the attached patch seemed pretty simple. Given my past experience submitting patches, I'm sure I missed something and this patch ends up blowing up something :-). Thanks, -- Yoann Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: flowables.patch Type: application/octet-stream Size: 645 bytes Desc: not available Url : From timr at probo.com Tue Oct 21 12:56:12 2008 From: timr at probo.com (Tim Roberts) Date: Tue, 21 Oct 2008 09:56:12 -0700 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <77A9E75DA75C564D82BDC4B18A7D8525305623@ROHRPOSTIX.tup.ads> References: <77A9E75DA75C564D82BDC4B18A7D8525305623@ROHRPOSTIX.tup.ads> Message-ID: <48FE09AC.4080502@probo.com> Henning von Bargen wrote: > I noticed the same effect. > > On another (but similar) topic, I'd like to mention that the "leading" attribute > in the Paragraph implementation differs from its usual meaning: > According to Wikipedia, in type-setting, "leading" is the inter-line distance > (such that line_height = ascent + descent + leading), > whereas in ReportLab, "leading" is the same as line_height, AFAIK. > In physical typesetting, this is true. The name comes from the slugs of lead that were inserted between rows of type. However, in desktop publishing, "leading" has always referred to the baseline-to-baseline distance. QuarkXPress uses this meaning, and it is as close to definitive as one can get in this industry. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From Michael at Hipp.com Tue Oct 21 13:04:15 2008 From: Michael at Hipp.com (Michael Hipp) Date: Tue, 21 Oct 2008 12:04:15 -0500 Subject: [reportlab-users] ReportLab 2.2 for Python 2.6? Message-ID: <48FE0B8F.5050403@Hipp.com> Was wondering if there will be a version of ReportLab 2.2 released for Python 2.6? Thanks, Michael Hipp From timr at probo.com Tue Oct 21 13:10:23 2008 From: timr at probo.com (Tim Roberts) Date: Tue, 21 Oct 2008 10:10:23 -0700 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <48FE09AC.4080502@probo.com> References: <77A9E75DA75C564D82BDC4B18A7D8525305623@ROHRPOSTIX.tup.ads> <48FE09AC.4080502@probo.com> Message-ID: <48FE0CFF.7040803@probo.com> Tim Roberts wrote: > Henning von Bargen wrote: > >> I noticed the same effect. >> >> On another (but similar) topic, I'd like to mention that the "leading" attribute >> in the Paragraph implementation differs from its usual meaning: >> According to Wikipedia, in type-setting, "leading" is the inter-line distance >> (such that line_height = ascent + descent + leading), >> whereas in ReportLab, "leading" is the same as line_height, AFAIK. >> >> > > In physical typesetting, this is true. The name comes from the slugs of > lead that were inserted between rows of type. > As long as I'm spewing out trivia, I should also point out ,that because it derives from the element "lead", the term is pronounced to rhyme with "bedding", not "bleeding". For those of you in the UK, "rhymes with Reading, not with reading"... -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From robin at reportlab.com Tue Oct 21 13:17:08 2008 From: robin at reportlab.com (Robin Becker) Date: Tue, 21 Oct 2008 18:17:08 +0100 Subject: [reportlab-users] ReportLab 2.2 for Python 2.6? In-Reply-To: <48FE0B8F.5050403@Hipp.com> References: <48FE0B8F.5050403@Hipp.com> Message-ID: <48FE0E94.1010300@chamonix.reportlab.co.uk> Michael Hipp wrote: > Was wondering if there will be a version of ReportLab 2.2 released for > Python 2.6? > > Thanks, > Michael Hipp I'm already building daily packages based on 2.6, so I'll need to backport the 2.2 release and create the release package. I'll try and do it tomorrow. -- Robin Becker From andy at reportlab.com Tue Oct 21 16:56:42 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 21 Oct 2008 21:56:42 +0100 Subject: [reportlab-users] Paragraph "Hack" In-Reply-To: <48FE09AC.4080502@probo.com> References: <77A9E75DA75C564D82BDC4B18A7D8525305623@ROHRPOSTIX.tup.ads> <48FE09AC.4080502@probo.com> Message-ID: <956003ae0810211356m6c02860fp7da65cd35029d03f@mail.gmail.com> 2008/10/21 Tim Roberts : > However, in desktop publishing, "leading" has always referred to the > baseline-to-baseline distance. QuarkXPress uses this meaning, and it is > as close to definitive as one can get in this industry. Also, it isn't coming from us. It's defined in the PDF Spec, and we just pass the parameter through into the generated PDF. - Andy From pmattingly at mail.csuchico.edu Tue Oct 21 17:26:53 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Tue, 21 Oct 2008 14:26:53 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <200810180824.53523.ralsina@netmanagers.com.ar> References: <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> <200810180824.53523.ralsina@netmanagers.com.ar> Message-ID: Again, I truly did not mean to "snark" (is that a verb now?), I just "wrote angry"; Not necessarily about the subject at hand, if that makes any sense. >_> I do write well, I've worked very hard to become so. So I would like to contribute one of my stronger skills (writing) while working on understanding ReportLab (a weaker skill). In fact I believe it would be conducive to the process of learning about ReportLab, as I would have to gain a thorough knowledge of various topics in order to write knowledgeably about them. On Sat, Oct 18, 2008 at 4:24 AM, Roberto Alsina wrote: > On Saturday 18 October 2008 01:43:43 Peter Mattingly wrote: > > I would like to see the documentation submission process streamlined in > > some fashion, I believe that writing programmatic constructs is too much > to > > ask for simple changes in language. Though I do see the point for > > examples, teaching code, etc. > > > > I mention Wiki's because I believe they would be a good solution to the > > problem of making the documentation more community oriented and would > lower > > the bar for submissions. I certainly did not mean to imply anything > > negative by offering my opinion on wiki's! > > > > I think that point of Roberto's was pretty bizzarre, but I wanted to > cover > > it anyway in case anyone got the wrong idea. > > You are right. Rereading your original post, the part about wikis is > perhaps > the more reasonable one. I was just tired of eating snarkiness for 50 > paragraphs and let that colour my perception. > > As you said: "Nerd's aren't good at writing, in general. Me being the > exception." > > -- > ("\''/").__..-''"`-. . Roberto Alsina > `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) > (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar > _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia > (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) > > Debugging is twice as hard as writing the code in the first place. > Therefore, if you write the code as cleverly as possible, you are, > by definition, not smart enough to debug it. --Brian W. Kernighan > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmattingly at mail.csuchico.edu Tue Oct 21 17:28:38 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Tue, 21 Oct 2008 14:28:38 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <1224381181.6368.152.camel@esetera> References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> <1224381181.6368.152.camel@esetera> Message-ID: I'm getting some odd behavior when I look at http://en.flossmanuals.net/, I only see the page source. I do filter via Privoxy (http://www.privoxy.org/) and NoScript (http://noscript.net/), but disabling both of these programs makes no change in the presentation. On Sat, Oct 18, 2008 at 6:53 PM, adam hyde wrote: > hi > > Would you consider using FLOSS Manuals for the docs? > > We have a good system in place, and we use Reportlab to gen the PDF for > print ready source: > http://www.flossmanuals.net > > > adam > > > On Fri, 2008-10-17 at 18:03 -0700, Peter Mattingly wrote: > > "But i our favour, we do have a broadly accurate user guide, the > > source to create it, and a ton of readable, working tests" > > > > > > Granted. As much as I harp on the lack of documentation, this > > documentation is miles above any other open source documentation I've > > ever seen; With the statistically anomolous exception of larger > > projects: Samba, Mplayer, Apache, etc; Which have financial backing in > > some fashion, for the most part. > > > > "The only workable solution is a community effort, which I have been > > pleading for on this list for years." > > > > > > Nerd's aren't good at writing, in general. Me being the exception. I > > had to work really hard to be as fluent with printed text as with > > words; To be fair I have an unfair advantage of being naturally > > pre-disposed to this type of discourse. > > > > "The source to the docs has been in every distro since launch until, > > oh, about 3 weeks ago (you have to use svn now). They are just Python > > scripts. This was our criterion for release 1." > > > > > > I didn't mean that this was the first I've heard of doc patching in > > *this* project, really in *any* project. Finding any dedicated effort > > to create documentation for anyone with an open source project is > > laudible. And asking for user input on documentation? I've never > > even heard of any dev *proposing* such; They'll just bang something > > together at the last minute, spelling, gramatically and factual errors > > included; Rife with "...this should be obvious..." and other > > wearisomly predictable and unhelpful catchisms that make their > > projects terrible to behold. So when I say "This was the first I've > > heard..." really it's worse than you thought. > > > > "If someone finds that the user guide doesn't explain something > > clearly enough, and has *an hour to spare*, it would be great if they > > could either (a) send in a *patch correcting or expanding it* (i.e. 20 > > lines to generate the right paragraphs in the guide); or (b) send in a > > *test script or teaching example*. We can review and check these > > things quickly." > > > > > > Emphasis mine. So you're saying: if I want to "patch" (e.g. revise or > > completely re-write from the ground up) a segment of documentation I > > have to send in code? Before I say anything more about that, let me > > quote from the user guide for a second: > > > > *The two attributes spaceBefore and spaceAfter do what they > > say*, except at the top or bottom of a > > frame. At the top of a frame, spaceBefore is ignored, and at > > the bottom, spaceAfter is ignored. This > > means that you could specify that a 'Heading2' style had two > > inches of space before when it occurs in > > mid-page, but will not get acres of whitespace at the top of a > > page. These two attributes should be thought of > > as 'requests' to the Frame and are not part of the space > > occupied by the Paragraph itself. > > > > *The fontSize and fontName tags are obvious*, but it is > > important to set the leading. This is the > > spacing between adjacent lines of text; a good rule of thumb > > is to make this 20% larger than the point size. > > To get double-spaced text, use a high leading. If you set > > autoLeading(default "off") to "min"(use > > observed leading even if smaller than specified) or "max"(use > > the larger of observed and specified) then an > > attempt is made to determine the leading on a line by line > > basis. This may be useful if the lines contain > > different font sizes etc. > > (Page 62 of the user guide, section 6.1 ) > > > > > > "The two attributes spaceBefore and spaceAfter do what they say" > > > > Oh they do, do they? > > > > So in this context we're talking about Paragraphs and their associated > > style's correct? So a style would dictate certain properties of the > > Paragraph and the text they contain right? So spaceBefore and > > spaceAfter provide some variables for manipulating space having to > > deal with the paragraph; But what space? Perhaps spacing between > > letters in the text? Vertical space between paragraphs? Horizontal? > > Spacing between lines of the text in the paragraph? Something else? > > > > From the rest of the text it's implied that this is padding within the > > frame surrounding the paragraph. > > > > You can see where some of my frustration comes from. > > > > Now here, I'll provide a little rewrite for the second case I've > > cited: > > > > The fontSize and fontName attributes, set size of the font > > being used (e.g. size 12, 16, 20, etc) and the name of the > > font being used when creating text (e.g. Times New Roman, > > Verdana, etc) respectively. > > > > It isn't perfect and probably could use some revision and editing. > > But it's quite a lot better than "The fontSize and fontName tags are > > obvious". But in order to submit my revision I have to figure out how > > to embed it in Report Lab programming code? That's ridiculous. > > > > I'm currently a student learning how to do more with Report Labs, I'm > > not experienced enough with your conventions to create clean portable > > code. But at the same time, I'm able to revise and elucidate a > > section of the user manual with perfect clarity and a few minutes > > time. This would not be the case with programmtically creating a > > similar solution. If the time I've spent so far is any indication, > > such a project would require *multiple hours* of work to fully > > understand the entire process. I suspect I've found an inefficiency > > in the process of the community driven documentation you're trying to > > create. > > > > I can however make changes to a Wiki, which is a much simpler approach > > that others have taken to create community editable documents - > > including user documentation. The experience is akin to making a post > > on a forum or writing a letter, rather than programming. > > > > I would recommend Media Wiki (http://www.mediawiki.org/wiki/MediaWiki) > > which is used with Wikipedia. If that's too much administrative > > overhead (too much for me at least!), you can use any one of these > > others: > > > > http://en.wikipedia.org/wiki/Comparison_of_wiki_software > > > > Some of the better solutions are TiddlyWiki and DokuWiki for a simpler > > approach. I'm running DokuWiki and I'm very happy with it. I've > > heard nothing but good things about TiddlyWiki. > > > > Thank you for taking the time to talk with me about these issues. I > > hope to be of some help in the future. Report Labs is one of the few > > programmatically accesible methods I've found for creating highly > > formatted output for more than report creation; Which seems to be all > > that other techies seem to aspire their output to be. >< > > > > > > On Mon, Oct 13, 2008 at 11:24 PM, Andy Robinson > > wrote: > > 2008/10/13 Peter Mattingly : > > > You know what I mean though? Sufficient technical > > documentation is one huge > > > hurdle that OSS in general has to get over before any sort > > of general (read: > > > Non-maddeningly frustrating) adoption can take place. > > > > > > You're correct; it is a weakness. (But i our favour, we do > > have a > > broadly accurate user > > guide, the source to create it, and a ton of readable, working > > tests). > > But it also > > takes a heck of a lot of time - more than maintaining > > the code does. It's not just documenting new features, it's > > constantly > > pruning and editing everything which may be affected by a > > change. The only > > workable solution is a community effort, which I have been > > pleading for on this > > list for years. > > > > > > > > And...you can patch the docs? First I've heard of doing > > that... > > > > > > The source to the docs has been in every distro since launch > > until, > > oh, about 3 weeks ago (you have to use svn now). They are > > just Python > > scripts. This was our criterion for release 1. > > > > If someone finds that the user guide doesn't explain something > > clearly enough, > > and has an hour to spare, it would be great if they could > > either (a) send > > in a patch correcting or expanding it (i.e. 20 lines to > > generate the right > > paragraphs in the guide); or (b) send in a test script or > > teaching example. > > We can review and check these things quickly. > > > > > > Best Regards, > > > > -- > > Andy Robinson > > CEO/Chief Architect > > ReportLab Europe Ltd. > > 165 The Broadway, Wimbledon, London SW19 1NE, UK > > Tel +44-20-8544-8049 > > > > _______________________________________________ > > reportlab-users mailing list > > reportlab-users at reportlab.com > > http://two.pairlist.net/mailman/listinfo/reportlab-users > > > > > > > > _______________________________________________ > > reportlab-users mailing list > > reportlab-users at reportlab.com > > http://two.pairlist.net/mailman/listinfo/reportlab-users > -- > Adam Hyde > Founder FLOSS Manuals > http://www.flossmanuals.net > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at flossmanuals.net Tue Oct 21 17:33:19 2008 From: adam at flossmanuals.net (adam hyde) Date: Tue, 21 Oct 2008 17:33:19 -0400 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> <1224381181.6368.152.camel@esetera> Message-ID: <1224624799.6393.200.camel@esetera> that is pretty bizarre...what OS and browser? adam On Tue, 2008-10-21 at 14:28 -0700, Peter Mattingly wrote: > I'm getting some odd behavior when I look at > http://en.flossmanuals.net/, I only see the page source. I do filter > via Privoxy (http://www.privoxy.org/) and NoScript > (http://noscript.net/), but disabling both of these programs makes no > change in the presentation. > > On Sat, Oct 18, 2008 at 6:53 PM, adam hyde > wrote: > hi > > Would you consider using FLOSS Manuals for the docs? > > We have a good system in place, and we use Reportlab to gen > the PDF for > print ready source: > http://www.flossmanuals.net > > > adam > > > > On Fri, 2008-10-17 at 18:03 -0700, Peter Mattingly wrote: > > "But i our favour, we do have a broadly accurate user guide, > the > > source to create it, and a ton of readable, working tests" > > > > > > Granted. As much as I harp on the lack of documentation, > this > > documentation is miles above any other open source > documentation I've > > ever seen; With the statistically anomolous exception of > larger > > projects: Samba, Mplayer, Apache, etc; Which have financial > backing in > > some fashion, for the most part. > > > > "The only workable solution is a community effort, which I > have been > > pleading for on this list for years." > > > > > > Nerd's aren't good at writing, in general. Me being the > exception. I > > had to work really hard to be as fluent with printed text as > with > > words; To be fair I have an unfair advantage of being > naturally > > pre-disposed to this type of discourse. > > > > "The source to the docs has been in every distro since > launch until, > > oh, about 3 weeks ago (you have to use svn now). They are > just Python > > scripts. This was our criterion for release 1." > > > > > > I didn't mean that this was the first I've heard of doc > patching in > > *this* project, really in *any* project. Finding any > dedicated effort > > to create documentation for anyone with an open source > project is > > laudible. And asking for user input on documentation? I've > never > > even heard of any dev *proposing* such; They'll just bang > something > > together at the last minute, spelling, gramatically and > factual errors > > included; Rife with "...this should be obvious..." and other > > wearisomly predictable and unhelpful catchisms that make > their > > projects terrible to behold. So when I say "This was the > first I've > > heard..." really it's worse than you thought. > > > > "If someone finds that the user guide doesn't explain > something > > clearly enough, and has *an hour to spare*, it would be > great if they > > could either (a) send in a *patch correcting or expanding > it* (i.e. 20 > > lines to generate the right paragraphs in the guide); or (b) > send in a > > *test script or teaching example*. We can review and check > these > > things quickly." > > > > > > Emphasis mine. So you're saying: if I want to "patch" (e.g. > revise or > > completely re-write from the ground up) a segment of > documentation I > > have to send in code? Before I say anything more about > that, let me > > quote from the user guide for a second: > > > > *The two attributes spaceBefore and spaceAfter do > what they > > say*, except at the top or bottom of a > > frame. At the top of a frame, spaceBefore is > ignored, and at > > the bottom, spaceAfter is ignored. This > > means that you could specify that a 'Heading2' style > had two > > inches of space before when it occurs in > > mid-page, but will not get acres of whitespace at > the top of a > > page. These two attributes should be thought of > > as 'requests' to the Frame and are not part of the > space > > occupied by the Paragraph itself. > > > > *The fontSize and fontName tags are obvious*, but it > is > > important to set the leading. This is the > > spacing between adjacent lines of text; a good rule > of thumb > > is to make this 20% larger than the point size. > > To get double-spaced text, use a high leading. If > you set > > autoLeading(default "off") to "min"(use > > observed leading even if smaller than specified) or > "max"(use > > the larger of observed and specified) then an > > attempt is made to determine the leading on a line > by line > > basis. This may be useful if the lines contain > > different font sizes etc. > > (Page 62 of the user guide, section 6.1 ) > > > > > > "The two attributes spaceBefore and spaceAfter do what they > say" > > > > Oh they do, do they? > > > > So in this context we're talking about Paragraphs and their > associated > > style's correct? So a style would dictate certain > properties of the > > Paragraph and the text they contain right? So spaceBefore > and > > spaceAfter provide some variables for manipulating space > having to > > deal with the paragraph; But what space? Perhaps spacing > between > > letters in the text? Vertical space between paragraphs? > Horizontal? > > Spacing between lines of the text in the paragraph? > Something else? > > > > From the rest of the text it's implied that this is padding > within the > > frame surrounding the paragraph. > > > > You can see where some of my frustration comes from. > > > > Now here, I'll provide a little rewrite for the second case > I've > > cited: > > > > The fontSize and fontName attributes, set size of > the font > > being used (e.g. size 12, 16, 20, etc) and the name > of the > > font being used when creating text (e.g. Times New > Roman, > > Verdana, etc) respectively. > > > > It isn't perfect and probably could use some revision and > editing. > > But it's quite a lot better than "The fontSize and fontName > tags are > > obvious". But in order to submit my revision I have to > figure out how > > to embed it in Report Lab programming code? That's > ridiculous. > > > > I'm currently a student learning how to do more with Report > Labs, I'm > > not experienced enough with your conventions to create clean > portable > > code. But at the same time, I'm able to revise and > elucidate a > > section of the user manual with perfect clarity and a few > minutes > > time. This would not be the case with programmtically > creating a > > similar solution. If the time I've spent so far is any > indication, > > such a project would require *multiple hours* of work to > fully > > understand the entire process. I suspect I've found an > inefficiency > > in the process of the community driven documentation you're > trying to > > create. > > > > I can however make changes to a Wiki, which is a much > simpler approach > > that others have taken to create community editable > documents - > > including user documentation. The experience is akin to > making a post > > on a forum or writing a letter, rather than programming. > > > > I would recommend Media Wiki > (http://www.mediawiki.org/wiki/MediaWiki) > > which is used with Wikipedia. If that's too much > administrative > > overhead (too much for me at least!), you can use any one of > these > > others: > > > > http://en.wikipedia.org/wiki/Comparison_of_wiki_software > > > > Some of the better solutions are TiddlyWiki and DokuWiki for > a simpler > > approach. I'm running DokuWiki and I'm very happy with it. > I've > > heard nothing but good things about TiddlyWiki. > > > > Thank you for taking the time to talk with me about these > issues. I > > hope to be of some help in the future. Report Labs is one > of the few > > programmatically accesible methods I've found for creating > highly > > formatted output for more than report creation; Which seems > to be all > > that other techies seem to aspire their output to be. >< > > > > > > On Mon, Oct 13, 2008 at 11:24 PM, Andy Robinson > > > wrote: > > 2008/10/13 Peter Mattingly > : > > > You know what I mean though? Sufficient technical > > documentation is one huge > > > hurdle that OSS in general has to get over before > any sort > > of general (read: > > > Non-maddeningly frustrating) adoption can take > place. > > > > > > You're correct; it is a weakness. (But i our > favour, we do > > have a > > broadly accurate user > > guide, the source to create it, and a ton of > readable, working > > tests). > > But it also > > takes a heck of a lot of time - more than > maintaining > > the code does. It's not just documenting new > features, it's > > constantly > > pruning and editing everything which may be affected > by a > > change. The only > > workable solution is a community effort, which I > have been > > pleading for on this > > list for years. > > > > > > > > And...you can patch the docs? First I've heard of > doing > > that... > > > > > > The source to the docs has been in every distro > since launch > > until, > > oh, about 3 weeks ago (you have to use svn now). > They are > > just Python > > scripts. This was our criterion for release 1. > > > > If someone finds that the user guide doesn't explain > something > > clearly enough, > > and has an hour to spare, it would be great if they > could > > either (a) send > > in a patch correcting or expanding it (i.e. 20 lines > to > > generate the right > > paragraphs in the guide); or (b) send in a test > script or > > teaching example. > > We can review and check these things quickly. > > > > > > Best Regards, > > > > -- > > Andy Robinson > > CEO/Chief Architect > > ReportLab Europe Ltd. > > 165 The Broadway, Wimbledon, London SW19 1NE, UK > > Tel +44-20-8544-8049 > > > > _______________________________________________ > > reportlab-users mailing list > > reportlab-users at reportlab.com > > > http://two.pairlist.net/mailman/listinfo/reportlab-users > > > > > > > > _______________________________________________ > > reportlab-users mailing list > > reportlab-users at reportlab.com > > http://two.pairlist.net/mailman/listinfo/reportlab-users > > -- > Adam Hyde > Founder FLOSS Manuals > http://www.flossmanuals.net > > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > > > -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From pmattingly at mail.csuchico.edu Tue Oct 21 17:35:00 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Tue, 21 Oct 2008 14:35:00 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810191526r2ad9bd98pac4d27af3e7307a8@mail.gmail.com> References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> <956003ae0810191526r2ad9bd98pac4d27af3e7307a8@mail.gmail.com> Message-ID: > > I know it's weird but Roberto's RST2PDF didn't exist in 2000 when we > reached our "version 1" criterion of being able to create our own manual. > But it is NOT hard to suggest a concrete amendment, or open one of the > scripts and rewrite a few paragraphs; and you can check it isn't broken and > regenerate your own userguide in 2 seconds flat. That does look pretty easy. Thanks for pointing that out. Once we can publish them to HTML, it will > be fairly easy to allow 'comment this page' functionality like the > Django folks did. > A 'snippets' site would be really cool too, as long as people could > add screenshots or output samples. But all this takes time. > Excellent! That sounds ideal. Thank you for the update on the progress being made. The critical factor is still time. We make NO money from our open source > code, > and even if we got 100x more users, we would still make no money. Well that's too bad. Are you open to suggestions for taking advantage of the dearth of free work you have access to via your users? I don't know any off the top of my head, but I'm sure there's some way for your more experienced and vetted users to put together some functionality on your servers while at the same time maintaining security constraints. We can, however, quickly accept specific revisions or > contributions, however worded or submitted. You don't have take the word > "patch" too > literally - if someone sent in a text file attempting to explain Platypus a > bit better, or a specific list of > corrections, we'd happily check it in. > Excellent! I shall attempt to "doc-as-I-go" where I'm able. --Peter On Sun, Oct 19, 2008 at 3:26 PM, Andy Robinson wrote: > 2008/10/18 Peter Mattingly : > > Vertical space between paragraphs? > > That's the one. But you're the first person who has ever questioned > this one. While I accept that we do not have a clear explanation of > "how to make documents with Platypus", > > > > I'm currently a student learning how to do more with Report Labs, I'm not > > experienced enough with your conventions to create clean portable code. > But > > at the same time, I'm able to revise and elucidate a section of the user > > manual with perfect clarity and a few minutes time. > > Peter, you just haven't looked at the manual source. > The relevant source code look like this: > > ---trunk/src/docs/userguide/ch5_paragraphs.py line 87 ---- > > disc("""The two attributes $spaceBefore$ and $spaceAfter$ do what they > say, except at the top or bottom of a frame. At the top of a frame, > $spaceBefore$ is ignored, and at the bottom, $spaceAfter$ is ignored. > This means that you could specify that a 'Heading2' style had two > inches of space before when it occurs in mid-page, but will not > get acres of whitespace at the top of a page. These two attributes > should be thought of as 'requests' to the Frame and are not part > of the space occupied by the Paragraph itself.""") > > ----------------------------------------- > I know it's weird but Roberto's RST2PDF didn't exist in 2000 when we > reached our "version 1" criterion of being able to create our own manual. > But it is NOT hard to suggest a concrete amendment, or open one of the > scripts and rewrite a few paragraphs; and you can check it isn't broken and > regenerate your own userguide in 2 seconds flat. > > -- > > Moving forwards, I hope we'll end up with the documentation properly > versioned > in ReST, and be able to make both HTML docs on the site and PDF via our own > libraries and (probably) RST2PDF. Once we can publish them to HTML, it > will > be fairly easy to allow 'comment this page' functionality like the > Django folks did. > A 'snippets' site would be really cool too, as long as people could > add screenshots > or output samples. But all this takes time. > > The critical factor is still time. We make NO money from our open source > code, > and even if we got 100x more users, we would still make no money. > Therefore > we can't put large amounts of senior staff time into updating our open > source > docs. We can, however, quickly accept specific revisions or > contributions, however > worded or submitted. You don't have take the word "patch" too > literally - if someone sent in a text file > attempting to explain Platypus a bit better, or a specific list of > corrections, we'd > happily check it in. > > Best Regards, > > > Andy > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmattingly at mail.csuchico.edu Tue Oct 21 17:42:51 2008 From: pmattingly at mail.csuchico.edu (Peter Mattingly) Date: Tue, 21 Oct 2008 14:42:51 -0700 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: > > ReportLab Ltd. still cultivates its fear and wrong perceptions of losing > control over its baby. O.o What a genuinely puzzling statement. Usually OSS projects are so thrilled to receive community help... I'm sorry to hear about that. --Peter On Mon, Oct 20, 2008 at 1:43 AM, Dinu Gherman wrote: > Peter Mattingly: > > [...] So you're saying: if I want to "patch" (e.g. revise or completely >> re-write from the ground up) a segment of documentation I have to send in >> code? >> > > So true, in fact! I haven't seen it so clearly before. > It's kind of a blocker to ask people for code in order > to document the code. And I'm saying this as someone who > normally works with self-referential concepts in my tech- > nical writing and software development. > > I'm currently a student learning how to do more with Report Labs, I'm not >> experienced enough with your conventions to create clean portable code. But >> at the same time, I'm able to revise and elucidate a section of the user >> manual with perfect clarity and a few minutes time. This would not be the >> case with programmtically creating a similar solution. If the time I've >> spent so far is any indication, such a project would require *multiple >> hours* of work to fully understand the entire process. I suspect I've found >> an inefficiency in the process of the community driven documentation you're >> trying to create. >> >> I can however make changes to a Wiki, which is a much simpler approach >> that others have taken to create community editable documents - including >> user documentation. The experience is akin to making a post on a forum or >> writing a letter, rather than programming. >> > > Very well explained! Wikis have been suggested repeatedly > starting as long as eight years ago, maybe. And from my > point of view the situation hasn't changed. ReportLab Ltd. > still cultivates its fear and wrong perceptions of losing > control over its baby. > > As long as this remains an emotional issue rather than a > technical one, it is hard to see any perspective on real > progress towards a development (and documentation) process > which actually does significantly involve the community. > > One way out of this in the Open Source world would be a > fork of the project - this is not a suggestion, but a re- > minder. I hope it's not going to happen, but maybe this > is also just another useless fear. > > Regards, > > Dinu > > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at reportlab.com Tue Oct 21 18:58:20 2008 From: andy at reportlab.com (Andy Robinson) Date: Tue, 21 Oct 2008 23:58:20 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> <200810180824.53523.ralsina@netmanagers.com.ar> Message-ID: <956003ae0810211558l7be4e5c2qb01513ac8eeea087@mail.gmail.com> 2008/10/21 Peter Mattingly : > Again, I truly did not mean to "snark" (is that a verb now?), I just "wrote > angry"; Not necessarily about the subject at hand, if that makes any sense. >>_> > > I do write well, I've worked very hard to become so. So I would like to > contribute one of my stronger skills (writing) while working on > understanding ReportLab (a weaker skill). In fact I believe it would be > conducive to the process of learning about ReportLab, as I would have to > gain a thorough knowledge of various topics in order to write knowledgeably > about them. > Peter, any help would be most gratefully received. For now I'd suggest you just go through any bits of the user guide which confused you or could be improved, and just send us your modifications in whatever form is easiest. If you have subversion access and want to amend the scripts that create each chapter (which IMHO should be readable by any Python programmer, if a little weird), that's great; but we'd be equally happy with simple emails rewriting or expanding sections; or even with any separate teaching example programs you might wish to write. We can quickly reformat and commit these. ReportLab now have twice as many staff as a year ago and while many of our newbies don't have the in-depth knowledge of the framework yet, we certainly have the resources to ensure that "improvements to documentation" are quickly included. We also have a quieter patch coming up in November/December and plan a further release and substantial improvements to our site along the lines of making documentation more accessible. Hopefully if you can make some contributions, others will be prompted to follow suit! Best Regards, Andy From andy at reportlab.com Tue Oct 21 19:52:41 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 22 Oct 2008 00:52:41 +0100 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> Message-ID: <956003ae0810211652i14345fb4x44d1361ab415ef8@mail.gmail.com> 2008/10/20 Dinu Gherman : > Very well explained! Wikis have been suggested repeatedly > starting as long as eight years ago, maybe. Dinu, you forget that we set one up, and NOBODY except you used it. I think you added a few headings for others to fill in. Then we had to take it down when it got abused; it wasn't worth having an employee check it every few hours for abuse, or tighten up the security, when it was getting zero real use. Also, each time you raised this on lists over several years, I said "OK, who's going to contribute some documentation?" and got no volunteers. This time round, someone has volunteered to help with the manuals, which is great (thanks, Peter!); and several others are sending us patches regularly, which is a fantastic development. We will do our best to reinforce these efforts. But we do not, at this time, have a writer/editor on our staff with the time and the product knowledge to "lead" a wiki and get it off the ground. > ReportLab Ltd. > still cultivates its fear and wrong perceptions of losing > control over its baby. Of course we would prefer control. We are a commercial business and this is our core asset. If you are referring to deciding to keep our docs versioned along with our source rather than in a Wiki or FLOSSManuals, well, that's an engineering decision primarily stemming from the fact that our self-generating manuals are the biggest functional test cases we have; and because we think we can make them into very good tutorials on "how to publish a nice manual" over time, which is of wide interest. If you really believe a more open, bazaar-type approach would cause a million flowers to bloom, feel free to set up wikis or a FLOSSManual with our full blessing, or even to fork the code and maintain it yourself. I would be delighted if it worked, as it would save us a lot of time. But I have not yet seen the evidence that people outside ReportLab want to do long-term maintenance work or documentation on this library, so we will continue to use the tools which suit us. Best Regards, Andy From gherman at darwin.in-berlin.de Wed Oct 22 06:01:49 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Wed, 22 Oct 2008 12:01:49 +0200 Subject: [reportlab-users] Bulleted Text not displaying In-Reply-To: <956003ae0810211652i14345fb4x44d1361ab415ef8@mail.gmail.com> References: <956003ae0810131459k35fd8b35t8ae6e813bbf2f5f1@mail.gmail.com> <956003ae0810132324q510280bbt32aaf1617c974696@mail.gmail.com> <956003ae0810211652i14345fb4x44d1361ab415ef8@mail.gmail.com> Message-ID: <3369F67C-4CB1-4D7D-8787-C109826B8280@darwin.in-berlin.de> Preface: This should probably be under a different subject line, but I'm adopting here the usual behaviour to ignore such little details. Andy Robinson: > Dinu Gherman : >> Very well explained! Wikis have been suggested repeatedly >> starting as long as eight years ago, maybe. > > Dinu, you forget that we set one up, and NOBODY except you > used it. I think you added a few headings for others to fill in. > Then we had to take > it down when it got abused; it wasn't worth having an employee > check it every few hours for abuse, or tighten up the security, when > it was getting zero real use. Maybe it's me who has some false memories here, but I don't remeber that the Wiki you mention (I think it was MoinMoin) was public and even less that it was abused. I do remember though that nobody else inside ReportLab used it, yes, be- cause it didn't fit into its culture and belief system (my post-mortem analysis). > Also, > each time you raised this on lists over several years, I said > "OK, who's going to contribute some documentation?" and > got no volunteers. Is that another incarnation of the chicken-egg issue? Well, without some decent machinary you won't get any eggs. And just repeating that question didn't seem to help up to now, then, did it? > If you are referring to deciding to keep our docs versioned along > with our > source rather than in a Wiki or FLOSSManuals, well, that's an > engineering decision > primarily stemming from the fact that our self-generating manuals are > the biggest > functional test cases we have; and because we think we can make them > into very good tutorials on "how to publish a nice manual" over > time, which > is of wide interest. Then we probably just arent't there, yet? It's interesting to imagine a fictional startup named RebortLap trying to get funding from venture capitalists by saying "we'll publish a really cool manual to our product in ten years time." Yes, I'm exaggerating - sometimes a good technique to get insight, though. Engineering decision... are you really promoting your method of tutorial creation? Has anybody in real life outside of ReportLab adopted it for creating tutorials? I'd be surprised if that happened. I'm writing quite a lot of text with many different systems, but none of them looks like programming (not even LaTeX). Why? Because writers want to write. I think you're mixing different things, first the RL documen- tation and its role for the community and second your commer- cial projects and the features you need there. The most important purpose of the first is to learn how to use the library while reading the document, not the code needed to generate it. And if you want people to contribute you have to make that easy. Asking programming skills and complicating the process is not going to make contributions easier to make in a world of WikiPedia and similar sites. Showing the formidable skills of ReportLab stuff and code in generating all documents needed in the financial or other in- dustries is a different issue, because here you address de- cision makers. This can be done with sample documents and code taken from a "hall of fame of successful ReportLab pro- jects". And I'm sure you're doing that. But it has nothing to do with the real purpose of the manual (documentation). Since this posting is getting too long (sorry for repeating too many obvious things) and I have more important stuff to do, I'm closing with an idea you get for free: If you really want to be open and closed at the same time, why don't you set up a subsite where people can edit the manual code in RML which would be rendered on your site into PDF and could also be downloaded by others and rendered offline using z3c.rml? That could be a nice warm-up project for your new staff and would, perhaps, allow to keep together the various different purposes for the manual (documentation, test and gallery), all under your centralised control. That would mean a depar- ture from letting people easily render the documentation themselves, but I think most want to just read it, anyway. Regards, Dinu -------------- next part -------------- An HTML attachment was scrubbed... URL: From gherman at darwin.in-berlin.de Wed Oct 22 08:50:37 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Wed, 22 Oct 2008 14:50:37 +0200 Subject: [reportlab-users] LinkedIn group Message-ID: <50A3DC6E-E4A8-4A80-8FDB-AB87AFF6647D@darwin.in-berlin.de> FYI, there is a ReportLab related group on LinkedIn that some people on this list might want to join: http://www.linkedin.com/groups?gid=1009887 Regards, Dinu From dirk.holtwick at gmail.com Wed Oct 22 11:01:50 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Wed, 22 Oct 2008 17:01:50 +0200 Subject: [reportlab-users] [BUG] Table cell too big Message-ID: <48FF405E.3000106@gmail.com> Hi, there is an old issue with Reportlab tables that you get an error if a table cell is larger than the page itself, because a table cell will not be splitted inside. The traceback looks somewhat like this -----------------8<---------------[cut here] ... File "F:\work\xhtml2pdf-30\env-reportlab21-python24\lib\site-packages\reportlab\platypus\doctemplate.py", line 740, in build self.handle_flowable(flowables) File "F:\work\xhtml2pdf-30\env-reportlab21-python24\lib\site-packages\reportlab\platypus\doctemplate.py", line 671, in handle_flowable raise LayoutError(ident) LayoutError: Flowable with cell(0,0) containing u'\xa0Problem identified' too large on page 4 -----------------8<---------------[cut here] The only work around I found is to wrap the content of the table call with KeepInFrame() so that e.g. the content shrinks to fit. This is not a very good solution. Are there other ways to work around this problem? Is splitting of table cells planned? Cheers Dirk From dfh at forestfield.co.uk Wed Oct 22 11:50:41 2008 From: dfh at forestfield.co.uk (David Hughes) Date: Wed, 22 Oct 2008 16:50:41 +0100 Subject: [reportlab-users] Installing version 2.2 on Windows Message-ID: <48FF4BD1.5080103@forestfield.co.uk> I tried upgrading to version 2.2 under Windows and initially attempted the full build, using setup.py install, but got horribly tangled up trying to compile the c extensions because the lib and include directories for freetype2 look to be hard coded to locations on your own machines. So I just copied the reportlab directory tree over into site-packages as recommended for the manual install, and then downloaded _renderPM.pyd and _rl_accel.pyd separately. This means I don't believe I have freetype2 explicitly installed. Is this OK and sufficient? Regards, David Hughes -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirk.holtwick at gmail.com Wed Oct 22 12:06:55 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Wed, 22 Oct 2008 18:06:55 +0200 Subject: [reportlab-users] [Feature-Request] Message-ID: <48FF4F9F.8050903@gmail.com> Hi, am I right that there is no support for background colors and borders for partial text inside paragraphs? To speak with HTML: things like .... would be great. Please give me some feedback otherwise I would try to implement something like this for Reportlab to use this in XHTML2PDF . Cheers Dirk From gherman at darwin.in-berlin.de Wed Oct 22 12:12:54 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Wed, 22 Oct 2008 18:12:54 +0200 Subject: [reportlab-users] [Feature-Request] In-Reply-To: <48FF4F9F.8050903@gmail.com> References: <48FF4F9F.8050903@gmail.com> Message-ID: Dirk Holtwick: > am I right that there is no support for background colors > and borders for partial text inside paragraphs? My alterparagraphs [1] have "something like that", but it's not yet usable as tags the way you want. Sorry for that. ;-) Dinu [1] http://pypi.python.org/pypi/alterparagraphs From dirk.holtwick at gmail.com Wed Oct 22 12:32:18 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Wed, 22 Oct 2008 18:32:18 +0200 Subject: [reportlab-users] [Feature-Request] In-Reply-To: References: <48FF4F9F.8050903@gmail.com> Message-ID: <48FF5592.4080402@gmail.com> Hi Dinu, > My alterparagraphs [1] have "something like that", but it's > not yet usable as tags the way you want. Sorry for that. ;-) that looks very interesting and your approach to make code more readable is great. The original Paragraph code seems to like some cleanup ;) The parsing is not needed, since XHTML2PDF is doing all the stuff. My idea is to add a functionality to the fragments like the one providing "underline". Hope to get some results soon and will keep you informed. I just wanted to avoid to make a work twice :) Cheers Dirk From robin at reportlab.com Wed Oct 22 13:11:14 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 22 Oct 2008 18:11:14 +0100 Subject: [reportlab-users] Installing version 2.2 on Windows In-Reply-To: <48FF4BD1.5080103@forestfield.co.uk> References: <48FF4BD1.5080103@forestfield.co.uk> Message-ID: <48FF5EB2.8090900@chamonix.reportlab.co.uk> David Hughes wrote: > I tried upgrading to version 2.2 under Windows and initially attempted > the full build, using setup.py install, but got horribly tangled up > trying to compile the c extensions because the lib and include > directories for freetype2 look to be hard coded to locations on your own > machines. So I just copied the reportlab directory tree over into > site-packages as recommended for the manual install, and then downloaded > _renderPM.pyd and _rl_accel.pyd separately. This means I don't believe I > have freetype2 explicitly installed. Is this OK and sufficient? > > Regards, > > David Hughes ...... I believe our versions should have the freetype2 stuff statically linked so you don't need freetype2 explicitly. I hoped that people would use the setup.cfg file to specify where stuff lives, but obviously I was too stupid to put in text saying that was what you need to do :( -- Robin Becker From dirk.holtwick at gmail.com Wed Oct 22 18:23:57 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Thu, 23 Oct 2008 00:23:57 +0200 Subject: [reportlab-users] [Feature-Request] In-Reply-To: <48FF5592.4080402@gmail.com> References: <48FF4F9F.8050903@gmail.com> <48FF5592.4080402@gmail.com> Message-ID: <48FFA7FD.7090200@gmail.com> Well, I implemented the background feature for Paragraphs. It is based on the Reportlab 2.1 version because I have to avoid the trouble and bugs with the non breaking spaces (see older mails). You can set the background by setting the attribute "backColor" in ParaFrags. They will respect the font sizes, The speedup functions are not used, because they needed to be changed an therefore I turned them off. Here is the code. Hope you find it useful. But I think the Paragraph module should have a general cleanup and refactoring since the code is difficult to understand. http://code.google.com/p/xhtml2pdf/source/browse/branches/3.0/sx/pisa3/reportlab_paragraph.py Use Pisa/ XHTML2PDF to try this feature by using code like this: Yellow Background Dirk Dirk Holtwick schrieb: > Hi Dinu, > >> My alterparagraphs [1] have "something like that", but it's >> not yet usable as tags the way you want. Sorry for that. ;-) > > that looks very interesting and your approach to make code more readable > is great. The original Paragraph code seems to like some cleanup ;) > > The parsing is not needed, since XHTML2PDF is doing all the stuff. My > idea is to add a functionality to the fragments like the one providing > "underline". Hope to get some results soon and will keep you informed. I > just wanted to avoid to make a work twice :) > > Cheers > Dirk > > From robin at reportlab.com Thu Oct 23 05:35:17 2008 From: robin at reportlab.com (Robin Becker) Date: Thu, 23 Oct 2008 10:35:17 +0100 Subject: [reportlab-users] [Feature-Request] In-Reply-To: <48FFA7FD.7090200@gmail.com> References: <48FF4F9F.8050903@gmail.com> <48FF5592.4080402@gmail.com> <48FFA7FD.7090200@gmail.com> Message-ID: <49004555.1070607@chamonix.reportlab.co.uk> Dirk Holtwick wrote: > Well, I implemented the background feature for Paragraphs. It is based > on the Reportlab 2.1 version because I have to avoid the trouble and > bugs with the non breaking spaces (see older mails). > > You can set the background by setting the attribute "backColor" in > ParaFrags. They will respect the font sizes, The speedup functions are > not used, because they needed to be changed an therefore I turned them off. > > Here is the code. Hope you find it useful. But I think the Paragraph > module should have a general cleanup and refactoring since the code is > difficult to understand. > > http://code.google.com/p/xhtml2pdf/source/browse/branches/3.0/sx/pisa3/reportlab_paragraph.py > >....... Thanks Dirk, I'll take a look at this to see if I can make use of it. The parsing etc etc should be in place already. This unlike other simple attributes has to be done prior to doing the text rather than after. -- Robin Becker From henning.vonbargen at arcor.de Thu Oct 23 15:04:58 2008 From: henning.vonbargen at arcor.de (henning.vonbargen at arcor.de) Date: Thu, 23 Oct 2008 21:04:58 +0200 (CEST) Subject: [reportlab-users] Documenation (was: Bulleted Text not displaying) Message-ID: <7746388.1224788698233.JavaMail.ngmail@webmail11.arcor-online.net> > From: "Peter Mattingly" > Subject: Re: [reportlab-users] Bulleted Text not displaying > ... > Well that's too bad. Are you open to suggestions for taking advantage of > the dearth of free work you have access to via your users? I don't know > any > off the top of my head, but I'm sure there's some way for your more > experienced and vetted users to put together some functionality on your > servers while at the same time maintaining security constraints. Peter, well, you wrote you're good at writing and I'm sure you are. However, not all of us are as good at reading... I mean, not everybody reading this list is a native English speaker (me, for example). I have slight difficulties understanding your writing, since some of the words you are using I've never read before, like "conducive", "dearth", or "vetted". Though I can guess what you mean and if all else fails use a translator program, it'd be easier if you'd use a more simple English vocabulary - here on this list as well as for any documentation - for us dumb continental europeans etc ;-) Maybe you could just imagine explaining things to a child... Henning From henning.vonbargen at arcor.de Thu Oct 23 15:45:59 2008 From: henning.vonbargen at arcor.de (henning.vonbargen at arcor.de) Date: Thu, 23 Oct 2008 21:45:59 +0200 (CEST) Subject: [reportlab-users] Feature Request Message-ID: <18221841.1224791159837.JavaMail.ngmail@webmail11.arcor-online.net> > Date: Thu, 23 Oct 2008 00:23:57 +0200 > From: Dirk Holtwick > Subject: Re: [reportlab-users] [Feature-Request] > To: Support list for users of Reportlab software > > Message-ID: <48FFA7FD.7090200 at gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Well, I implemented the background feature for Paragraphs. It is based > on the Reportlab 2.1 version because I have to avoid the trouble and > bugs with the non breaking spaces (see older mails). > > You can set the background by setting the attribute "backColor" in > ParaFrags. They will respect the font sizes, The speedup functions are > not used, because they needed to be changed an therefore I turned them off. > > Here is the code. Hope you find it useful. But I think the Paragraph > module should have a general cleanup and refactoring since the code is > difficult to understand. > > http://code.google.com/p/xhtml2pdf/source/browse/branches/3.0/sx/pisa3/repor > tlab_paragraph.py > > Use Pisa/ XHTML2PDF to try this feature by > using code like this: > > Yellow Background > > Dirk It seems that at least Dirk, Dinu and I (in the wordaxe SVN at http://deco-cow.svn.sourceforge.net, see file wordaxe/rl/NewParagraph.py) all are working on a new Paragraph implementation. Perhaps it'd make sense to set up a common SVN "playground" for us such that we can co-work and share ideas and code. I invite you as SVN committers for the wordaxe library, if you like! Or perhaps ReportLab.com could open a branch on SVN for contributions? That way other RL users would find it more easily. And BTW this would be a good place to create unofficial documentation and samples as well. Henning From timr at probo.com Thu Oct 23 16:06:14 2008 From: timr at probo.com (Tim Roberts) Date: Thu, 23 Oct 2008 13:06:14 -0700 Subject: [reportlab-users] Documenation (was: Bulleted Text not displaying) In-Reply-To: <7746388.1224788698233.JavaMail.ngmail@webmail11.arcor-online.net> References: <7746388.1224788698233.JavaMail.ngmail@webmail11.arcor-online.net> Message-ID: <4900D936.5030905@probo.com> henning.vonbargen at arcor.de wrote: >> From: "Peter Mattingly" >> Subject: Re: [reportlab-users] Bulleted Text not displaying >> ... >> Well that's too bad. Are you open to suggestions for taking advantage of >> the dearth of free work you have access to via your users? I don't know >> any off the top of my head, but I'm sure there's some way for your more >> experienced and vetted users to put together some functionality on your >> servers while at the same time maintaining security constraints. >> > > Peter, > > well, you wrote you're good at writing and I'm sure you are. > However, not all of us are as good at reading... > > I mean, not everybody reading this list is a native English speaker (me, for example). > I have slight difficulties understanding your writing, since some of the words you are > using I've never read before, like "conducive", "dearth", or "vetted". > It's not fully clear that Peter has either... ;) "Dearth" means "shortage" or "scarcity", which is, I suspect, exactly the opposite of what he was trying to suggest. I suspect he meant something like "plethora" or "abundance". And, by the way, normally I would NEVER point out something like this on a mailing list. It's just that this thread happened to be ABOUT writing, and the irony struck me. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From andy at reportlab.com Fri Oct 24 01:24:53 2008 From: andy at reportlab.com (Andy Robinson) Date: Fri, 24 Oct 2008 06:24:53 +0100 Subject: [reportlab-users] Feature Request In-Reply-To: <18221841.1224791159837.JavaMail.ngmail@webmail11.arcor-online.net> References: <18221841.1224791159837.JavaMail.ngmail@webmail11.arcor-online.net> Message-ID: <956003ae0810232224n24415948uaae8bbedcf904fab@mail.gmail.com> 2008/10/23 : > Perhaps it'd make sense to set up a common SVN "playground" for us > such that we can co-work and share ideas and code. > > I invite you as SVN committers for the wordaxe library, if you like! > Or perhaps ReportLab.com could open a branch on SVN for contributions? > That way other RL users would find it more easily. > And BTW this would be a good place to create unofficial documentation and samples as well. We'd be very happy to do this. I'm travelling all this week and next and our office and SVN repository are being moved in the meantime, so please bear with us as it can't happen today. We'll get back to you with plans for this after the weekend. Best Regards. -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From ecomesana at googlemail.com Fri Oct 24 10:32:09 2008 From: ecomesana at googlemail.com (=?ISO-8859-1?Q?Enrique_Comesa=F1a_Figueroa?=) Date: Fri, 24 Oct 2008 16:32:09 +0200 Subject: [reportlab-users] About Helvetica font In-Reply-To: References: Message-ID: Hello, I am trying to generate a PDF document with embedded fonts. I have no problem with other fonts but Helvetica. It always appear in the list of fonts in the properties document even if i do not use it. And if I try to embed it in a document which uses this font, reportlab generates it but do not embed the Helvetica font. Can anyone help me?, If that is not possible, can anyone suggest me any other way to generate pdf with ALL fonts embedded? This is my python code: from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfgen.canvas import Canvas justFace = pdfmetrics.EmbeddedType1Face('./Helvetica.afm', './Helvetica.pfb') pdfmetrics.registerTypeFace(justFace) justFont = pdfmetrics.Font('Helvetica','Helvetica','WinAnsiEncoding') pdfmetrics.registerFont(justFont) c = Canvas('temp.pdf') c.setFont('Helvetica', 32) c.drawString(10, 150, "Some text") c.save() I have have the files Helvetica.afm and Helvetica.pfd in the same folder as the python script And pdffonts command return me this properties of the PDF document: >>> pdffonts temp.pdf name type emb sub uni object ID ------------------------------------ ----------------- --- --- --- --------- Helvetica Type 1 no no no 2 0 Many thanks, Enrique From adam at flossmanuals.net Fri Oct 24 10:34:14 2008 From: adam at flossmanuals.net (adam hyde) Date: Fri, 24 Oct 2008 10:34:14 -0400 Subject: [reportlab-users] About Helvetica font In-Reply-To: References: Message-ID: <1224858854.6255.114.camel@esetera> hi, if you use Ghostscript after you have made the PDF it can force embed all fonts adam On Fri, 2008-10-24 at 16:32 +0200, Enrique Comesa?a Figueroa wrote: > Hello, > > I am trying to generate a PDF document with embedded fonts. I have no > problem with other fonts but Helvetica. It always appear in the list > of fonts in the properties document even if i do not use it. > And if I try to embed it in a document which uses this font, reportlab > generates it but do not embed the Helvetica font. > > Can anyone help me?, If that is not possible, can anyone suggest me > any other way to generate pdf with ALL fonts embedded? > > This is my python code: > > from reportlab.pdfbase import pdfmetrics > from reportlab.pdfbase.ttfonts import TTFont > from reportlab.pdfgen.canvas import Canvas > > justFace = pdfmetrics.EmbeddedType1Face('./Helvetica.afm', './Helvetica.pfb') > pdfmetrics.registerTypeFace(justFace) > justFont = pdfmetrics.Font('Helvetica','Helvetica','WinAnsiEncoding') > pdfmetrics.registerFont(justFont) > > c = Canvas('temp.pdf') > c.setFont('Helvetica', 32) > c.drawString(10, 150, "Some text") > c.save() > > > I have have the files Helvetica.afm and Helvetica.pfd in the same > folder as the python script > And pdffonts command return me this properties of the PDF document: > > >>> pdffonts temp.pdf > name type emb sub uni object ID > ------------------------------------ ----------------- --- --- --- --------- > Helvetica Type 1 no no no 2 0 > > Many thanks, > Enrique > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From timr at probo.com Fri Oct 24 12:36:04 2008 From: timr at probo.com (Tim Roberts) Date: Fri, 24 Oct 2008 09:36:04 -0700 Subject: [reportlab-users] About Helvetica font In-Reply-To: References: Message-ID: <4901F974.405@probo.com> Enrique Comesa?a Figueroa wrote: > I am trying to generate a PDF document with embedded fonts. I have no > problem with other fonts but Helvetica. It always appear in the list > of fonts in the properties document even if i do not use it. > And if I try to embed it in a document which uses this font, reportlab > generates it but do not embed the Helvetica font. > > Can anyone help me?, If that is not possible, can anyone suggest me > any other way to generate pdf with ALL fonts embedded? > That's not supposed to be required. Every PostScript rasterizer, per standard, should be able to understand a small, core set of Type 1 fonts, including Helvetica. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From dirk.holtwick at gmail.com Fri Oct 24 12:59:14 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Fri, 24 Oct 2008 18:59:14 +0200 Subject: [reportlab-users] Feature Request In-Reply-To: <18221841.1224791159837.JavaMail.ngmail@webmail11.arcor-online.net> References: <18221841.1224791159837.JavaMail.ngmail@webmail11.arcor-online.net> Message-ID: <4901FEE2.2080101@gmail.com> Hi Henning, > Perhaps it'd make sense to set up a common SVN "playground" for us > such that we can co-work and share ideas and code. > > I invite you as SVN committers for the wordaxe library, if you like! > Or perhaps ReportLab.com could open a branch on SVN for contributions? > That way other RL users would find it more easily. > And BTW this would be a good place to create unofficial documentation and samples as well. I just modified the Paragraph implementation because I needed to... but you are totally right that a combined effort would bring things to a better end. I had a look at your implementation and it looks like a good starting point. The implementation of Dinu is clean but I guess it does not yet offer all the features the Reportlab Paragraph offers. All that I need is a paragraph object that takes fragments where each fragment can have some style properties. I see this in your implementation, Henning, and the general abstraction look usable. Maybe one could go a step further and try to to get again more small maintainable peaces like Dinu did. Since my time to spend on this is limited I can not promise to be a big help. But I would gladly accept a SVN access to contribute as time allows me to. But of course you are also invited to join my XHTML2PDF SVN repository or we can just set up a new one on Google Code. That's just a matter of minutes. BTW: The last feature that I would like to implement are borders for inline elements. Maybe I add them to the existing paragraph too. @robin: My implementation gets trouble if used in multi pass. Since this is not important for me, I just ignored it there. See http://code.google.com/p/xhtml2pdf/source/browse/branches/3.0/sx/pisa3/reportlab_paragraph.py for the latest changes. Cheers Dirk From adam at flossmanuals.net Fri Oct 24 12:59:16 2008 From: adam at flossmanuals.net (adam hyde) Date: Fri, 24 Oct 2008 12:59:16 -0400 Subject: [reportlab-users] About Helvetica font In-Reply-To: <4901F974.405@probo.com> References: <4901F974.405@probo.com> Message-ID: <1224867556.6359.17.camel@esetera> On Fri, 2008-10-24 at 09:36 -0700, Tim Roberts wrote: > Enrique Comesa?a Figueroa wrote: > > I am trying to generate a PDF document with embedded fonts. I have no > > problem with other fonts but Helvetica. It always appear in the list > > of fonts in the properties document even if i do not use it. > > And if I try to embed it in a document which uses this font, reportlab > > generates it but do not embed the Helvetica font. > > > > Can anyone help me?, If that is not possible, can anyone suggest me > > any other way to generate pdf with ALL fonts embedded? > > > > That's not supposed to be required. Every PostScript rasterizer, per > standard, should be able to understand a small, core set of Type 1 > fonts, including Helvetica. Print on demand services often require _all_ fonts to be embedded adam > -- Adam Hyde Founder FLOSS Manuals http://www.flossmanuals.net From ecomesana at googlemail.com Fri Oct 24 13:23:00 2008 From: ecomesana at googlemail.com (=?ISO-8859-1?Q?Enrique_Comesa=F1a_Figueroa?=) Date: Fri, 24 Oct 2008 19:23:00 +0200 Subject: [reportlab-users] About Helvetica font In-Reply-To: <1224858854.6255.114.camel@esetera> References: <1224858854.6255.114.camel@esetera> Message-ID: Thanks Adam, With Ghostscript I was able to remove the Helvetica from the document if I do not use it. But if it is used in any part of the document it continues appearing without being embedded. I have used Ghostcript with these options, is that what did you mean? >>> gs -q -sDEVICE=pdfwrite -dEmbedAllFonts=true -sOutputFile=out_temp.pdf temp.pdf However, now it is working as I wanted, I do not need to have Helvetica in my documents. Many thanks Enrique 2008/10/24 adam hyde : > hi, > > if you use Ghostscript after you have made the PDF it can force embed > all fonts > > > adam > > On Fri, 2008-10-24 at 16:32 +0200, Enrique Comesa?a Figueroa wrote: >> Hello, >> >> I am trying to generate a PDF document with embedded fonts. I have no >> problem with other fonts but Helvetica. It always appear in the list >> of fonts in the properties document even if i do not use it. >> And if I try to embed it in a document which uses this font, reportlab >> generates it but do not embed the Helvetica font. >> >> Can anyone help me?, If that is not possible, can anyone suggest me >> any other way to generate pdf with ALL fonts embedded? >> >> This is my python code: >> >> from reportlab.pdfbase import pdfmetrics >> from reportlab.pdfbase.ttfonts import TTFont >> from reportlab.pdfgen.canvas import Canvas >> >> justFace = pdfmetrics.EmbeddedType1Face('./Helvetica.afm', './Helvetica.pfb') >> pdfmetrics.registerTypeFace(justFace) >> justFont = pdfmetrics.Font('Helvetica','Helvetica','WinAnsiEncoding') >> pdfmetrics.registerFont(justFont) >> >> c = Canvas('temp.pdf') >> c.setFont('Helvetica', 32) >> c.drawString(10, 150, "Some text") >> c.save() >> >> >> I have have the files Helvetica.afm and Helvetica.pfd in the same >> folder as the python script >> And pdffonts command return me this properties of the PDF document: >> >> >>> pdffonts temp.pdf >> name type emb sub uni object ID >> ------------------------------------ ----------------- --- --- --- --------- >> Helvetica Type 1 no no no 2 0 >> >> Many thanks, >> Enrique >> _______________________________________________ >> reportlab-users mailing list >> reportlab-users at reportlab.com >> http://two.pairlist.net/mailman/listinfo/reportlab-users > -- > Adam Hyde > Founder FLOSS Manuals > http://www.flossmanuals.net > > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users > From andy at reportlab.com Fri Oct 24 14:04:55 2008 From: andy at reportlab.com (Andy Robinson) Date: Fri, 24 Oct 2008 19:04:55 +0100 Subject: [reportlab-users] About Helvetica font In-Reply-To: <4901F974.405@probo.com> References: <4901F974.405@probo.com> Message-ID: <956003ae0810241104s1a300512kcb29163bf0a18e99@mail.gmail.com> 2008/10/24 Tim Roberts : > Enrique Comesa?a Figueroa wrote: >> Can anyone help me?, If that is not possible, can anyone suggest me >> any other way to generate pdf with ALL fonts embedded? >> > > That's not supposed to be required. Every PostScript rasterizer, per > standard, should be able to understand a small, core set of Type 1 > fonts, including Helvetica. > Also, we probably "declare" Helvetica as the base font used on each page, even if it is never used. So a font which is not used may appear. Printers sometimes ask for all fonts to be embedded to avoid any confusion. Also, the PDF/A spec (which we don't support but which represents a signifiicant movement) will require only embedded fonts to be used. The bad news is that today, our library doesn't let you change this. Some new options are needed around font handling. But I can't promise a fix date for any of these options unless someone rolls their sleevs up and has a go... Best Regards, Andy Robinson, ReportLab From paolo.cantore at t-online.de Sat Oct 25 05:37:52 2008 From: paolo.cantore at t-online.de (Paolo G. Cantore) Date: Sat, 25 Oct 2008 11:37:52 +0200 Subject: [reportlab-users] Has PageCompression changed from RL12 to RL22? In-Reply-To: <956003ae0810241104s1a300512kcb29163bf0a18e99@mail.gmail.com> References: <4901F974.405@probo.com> <956003ae0810241104s1a300512kcb29163bf0a18e99@mail.gmail.com> Message-ID: <4902E8F0.6040505@t-online.de> Hi all, I'm the service provider for a globally acting IT system. Every day we are sending out several thousands of emails with an attachment of PDF documents generated with Reportlab Toolkit (PageCompression enabled). When I was trying to upgrade from version 1.20 to 2.2 our customers where not able to open the documents with Adobe Reader anymore. Only a blank page was diplayed. I had to go back to version 1.20 immediately to prevent more complaints. After a series of tests I found a possible reason. With PageCompression enabled the whole content of the document was put on a single line (length ~28.000 chars). But in version 1.20 the compressed content is splitted into lines with a length of 60 characters ending with ^M (x'0d' = carriage return). This worked fine for all of our customers. Is my observation correct? Was it intended to change PageCompression behaviour? Please let me know. Paolo From andy at reportlab.com Sat Oct 25 14:27:42 2008 From: andy at reportlab.com (Andy Robinson) Date: Sat, 25 Oct 2008 19:27:42 +0100 Subject: [reportlab-users] Has PageCompression changed from RL12 to RL22? In-Reply-To: <4902E8F0.6040505@t-online.de> References: <4901F974.405@probo.com> <956003ae0810241104s1a300512kcb29163bf0a18e99@mail.gmail.com> <4902E8F0.6040505@t-online.de> Message-ID: <956003ae0810251127h63d2c63ei6d0509bb3123ec5b@mail.gmail.com> 2008/10/25 Paolo G. Cantore : > Is my observation correct? Was it intended to change PageCompression > behaviour? I am not aware of a deliberate reason for the change, but we have applications serving millions of pages per month to large ecommerce clients with the latest code, and nobody has reported the problem you have. We might have optimised it, because PDFs are supposed to be binary and Acrobat Distiller does one-line output sometimes. Are you able to send us a cut-down script which produces a PDF that repeatedly doesn't open in Adobe Reader? Also, is it possible that something else such as a MIME type when you attach to the emaill is corrupting the files? They should be labelled as "application/pdf" not "text/pdf". Best Regards, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 165 The Broadway, Wimbledon, London SW19 1NE, UK Tel +44-20-8544-8049 From labaker at teleport.com Sat Oct 25 19:26:15 2008 From: labaker at teleport.com (labaker at teleport.com) Date: Sat, 25 Oct 2008 16:26:15 -0700 (GMT-07:00) Subject: [reportlab-users] Remote Go-To Links Message-ID: <2707404.1224977175320.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net> Greetings, I see that ReportLab supports links to bookmarks within the same pdf document, and links to another pdf document, but I haven't figured out how to link to a bookmark within another pdf document. Can someone give me guidance? Also, when I go to a different pdf document, it does not appear that I can return to the original document from the Acrobat Reader navigation controls, neither with the "Go to Previous View" button nor with the "Window" menu item that shows all open windows. Can someone tell me how to do this? Thanks, Lang From gherman at darwin.in-berlin.de Sun Oct 26 14:16:06 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Sun, 26 Oct 2008 19:16:06 +0100 Subject: [reportlab-users] Bug report Userguide, address change Message-ID: <959347E9-20AF-4687-897F-75CBF920758B@darwin.in-berlin.de> Hi, please remove "()" in the following paragraph (without any replacement), an old email address I have stopped using about eight years ago...). See below. Sorry to spam the entire list for this little change, but that's the way it is. Thanks, Dinu PS: ReportLab User guide, Appendix A.3, "Py2pdf", page 82: Dinu Gherman () contributed this useful script which uses reportlab to produce nicely colorized PDF documents from Python scripts including bookmarks for classes, methods and functions. [...] From henning.vonbargen at arcor.de Sun Oct 26 18:06:16 2008 From: henning.vonbargen at arcor.de (henning.vonbargen at arcor.de) Date: Sun, 26 Oct 2008 23:06:16 +0100 (CET) Subject: [reportlab-users] ANN: wordaxe-0.3.0 Message-ID: <20514572.1225058776107.JavaMail.ngmail@webmail15.arcor-online.net> I'm proud to announce release 0.3.0 of the wordaxe hyphenation library (http://deco-cow.sourceforge.net) You can download the library from http://sourceforge.net/project/showfiles.php?group_id=105867 Apart from just being a hyphenation library, wordaxe adds hyphenation support to the ReportLab PDF library - for Paragraph, to be precise. This release is the first that uses the NewParagraph implementation by default, so now splitting a paragraph works as expected. BTW I also adopted Dirk Holtwick's backColor patch. I ran several tests and apart from autoleading and ImageAndFlowables, everything seems to work. If you need hyphenation in your ReportLab program, just give wordaxe a try. You'll only have to change a few lines of code. Henning From ralsina at netmanagers.com.ar Sun Oct 26 17:39:41 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Sun, 26 Oct 2008 19:39:41 -0200 Subject: [reportlab-users] ANN: wordaxe-0.3.0 References: <20514572.1225058776107.JavaMail.ngmail@webmail15.arcor-online.net> Message-ID: henning.vonbargen at arcor.de writes: > I'm proud to announce release 0.3.0 of the wordaxe hyphenation library (http://deco-cow.sourceforge.net) > You can download the library from http://sourceforge.net/project/showfiles.php?group_id=105867 Awesome. Any changes in the way to use it, or is it just better? :-) From gherman at darwin.in-berlin.de Mon Oct 27 07:19:59 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Mon, 27 Oct 2008 12:19:59 +0100 Subject: [reportlab-users] Documentation (was: Feature Request) In-Reply-To: <4901FEE2.2080101@gmail.com> References: <18221841.1224791159837.JavaMail.ngmail@webmail11.arcor-online.net> <4901FEE2.2080101@gmail.com> Message-ID: <8D1FB07F-E799-426B-B7B3-12984FE6DC5D@darwin.in-berlin.de> Dirk Holtwick: >> Perhaps it'd make sense to set up a common SVN "playground" for us >> such that we can co-work and share ideas and code. >> I invite you as SVN committers for the wordaxe library, if you like! >> Or perhaps ReportLab.com could open a branch on SVN for >> contributions? >> That way other RL users would find it more easily. >> And BTW this would be a good place to create unofficial >> documentation and samples as well. > > I just modified the Paragraph implementation because I needed to... > but you are totally right that a combined effort would bring things > to a better end. > > I had a look at your implementation and it looks like a good > starting point. The implementation of Dinu is clean but I guess it > does not yet offer all the features the Reportlab Paragraph offers. > > All that I need is a paragraph object that takes fragments where > each fragment can have some style properties. I see this in your > implementation, Henning, and the general abstraction look usable. > Maybe one could go a step further and try to to get again more small > maintainable peaces like Dinu did. As I see it, Henning, Dirk and I have slightly different goals, with mine being, maybe, the most amibitious, namely deriving a paragraph implementation that is rather easy to understand and to extend. As soon as some people want to join my effort I'm more than willing to move my code to an online repository like Launchpad. From my perspective the technology or tools are not the issue, but rather the lack of time, resources, interest and fear on different sides, some reasons of which being sometimes ex- pressed with some of the others. Another prime reason is documentation (and the lack of it). Sure, there is a user guide, but there is no developer guide and there never was. But when you analyse the feedback and questions on this list, a developer guide would be very help- ful, at least if ReportLab Ltd. wants to help others to de- velop additional features for their library. (Recently there was a question here about JavaScript, and I could name more.) The user guide contains only one chapter about developping, namely about flowables ("an open standard for creating re- usable report content"). Open Standard? Well, this is based on examples only and is much too simple to be useful for anything else than figures, especially not for anything that wraps. I think the best developer guide right now is Robin Becker responding on this list, and maybe it would be a good idea to give him four weeks off on the Seychelles with internet access so people could ask him anything and write down what he says. BTW, chapter 10 of the user guide says "We are open for suggestions. Please let us know what you think is missing." That's what I'm trying to do. Regards, Dinu From paul.barrass at safeonlinebilling.com Mon Oct 27 07:58:07 2008 From: paul.barrass at safeonlinebilling.com (Paul Barrass) Date: Mon, 27 Oct 2008 11:58:07 +0000 Subject: [reportlab-users] Potential workaround for performance issues on VERY long tables. Message-ID: <4905ACCF.5020508@safeonlinebilling.com> Hi, There's been discussion in the past regarding the relatively poor performance of ReportLab for very long tables (10's-100's of 1000's of lines). Way back in 2004, the official response (http://two.pairlist.net/pipermail/reportlab-users/2004-May/003019.html) was 'John has hit on the "official" answer - make lots of small tables. The only case I can see for not doing this is when you need a repeated table header.' I've recently run into the same problem - I was previously able to split the table into small tables of a fixed length by ensuring that all tables started on a new Frame, and fixing the rowHeights. That's no longer possible, as I've lost both of those constraints. I have found a workaround that allows me to split the table but still have a repeated table header. In the hope that it may be useful to others, I'll detail it below. This workaround requires that you are able to specify the widths of all the columns, but works where the heights of the rows are calculated. As in the "official" answer, make lots of small Tables (I find aiming to have roughly a pages-worth of rows per table seems to give the best performance - which is to be expected since the performance hit is in the splitting) without any header and a separate table containing just the header. Simply wrap each of the Tables in a PTOContainer (from from reportlab.platypus) giving the header table as the header to the PTOContainer. I'm sure there are many cases where this won't work or just look wrong - but in simple cases where you have lots of rows with simple styling and you just need a repeated header row, the above gives a noticeable performance boost for the same end effect. Apologies if this has already been discussed/solved before, but if it has I've not been able to find the discussion (and believe me, I've been looking... :) ). If the hint is useful, I'd be happy to see it make it's way into the documentation. Paul Barrass. From timr at probo.com Mon Oct 27 13:37:50 2008 From: timr at probo.com (Tim Roberts) Date: Mon, 27 Oct 2008 10:37:50 -0700 Subject: [reportlab-users] Has PageCompression changed from RL12 to RL22? In-Reply-To: <4902E8F0.6040505@t-online.de> References: <4901F974.405@probo.com> <956003ae0810241104s1a300512kcb29163bf0a18e99@mail.gmail.com> <4902E8F0.6040505@t-online.de> Message-ID: <4905FC6E.1020805@probo.com> Paolo G. Cantore wrote: > > Every day we are sending out several thousands of emails with an > attachment of > PDF documents generated with Reportlab Toolkit (PageCompression enabled). > > When I was trying to upgrade from version 1.20 to 2.2 our customers > where not > able to open the documents with Adobe Reader anymore. Only a blank > page was > diplayed. > > I had to go back to version 1.20 immediately to prevent more complaints. > > After a series of tests I found a possible reason. With > PageCompression enabled > the whole content of the document was put on a single line (length > ~28.000 chars). > > But in version 1.20 the compressed content is splitted into lines with > a length > of 60 characters ending with ^M (x'0d' = carriage return). This worked > fine > for all of our customers. Why does this matter? How are you encoding the file for attachment? Aren't you using base64? PDF is a binary format. Quoted-printable might work, but I would think anything other than base64 was just asking for trouble. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From paolo.cantore at t-online.de Mon Oct 27 17:16:06 2008 From: paolo.cantore at t-online.de (Paolo G. Cantore) Date: Mon, 27 Oct 2008 22:16:06 +0100 Subject: [reportlab-users] Has PageCompression changed from RL12 to RL22? In-Reply-To: <956003ae0810251127h63d2c63ei6d0509bb3123ec5b@mail.gmail.com> References: <4901F974.405@probo.com> <956003ae0810241104s1a300512kcb29163bf0a18e99@mail.gmail.com> <4902E8F0.6040505@t-online.de> <956003ae0810251127h63d2c63ei6d0509bb3123ec5b@mail.gmail.com> Message-ID: <49062F96.8070701@t-online.de> Andy Robinson wrote: > 2008/10/25 Paolo G. Cantore : > >> Is my observation correct? Was it intended to change PageCompression >> behaviour? >> > > I am not aware of a deliberate reason for the change, but we have > applications serving millions of pages per month to large ecommerce > clients with the latest code, and nobody has reported the problem you > have. We might have optimised it, because PDFs are supposed to be binary > and Acrobat Distiller does one-line output sometimes. > Are you able to send us a cut-down script which produces > a PDF that repeatedly doesn't open in Adobe Reader? > > > Best Regards, > Let me further explain: Reportlab output is always okay; there is no problem to open the pdf in Adobe Reader. Also sending the pdf via email works inside our corporate network. The problem comes up only when I send the pdf to external customers. In the meantime I found a switch in rl_config.py of Reportlab 2.2 to change the pageCompression behaviour back to Reportlab 1.20, it's wrapA85. Thank you for your hints. From paolo.cantore at t-online.de Mon Oct 27 17:59:19 2008 From: paolo.cantore at t-online.de (Paolo G. Cantore) Date: Mon, 27 Oct 2008 22:59:19 +0100 Subject: [reportlab-users] Has PageCompression changed from RL12 to RL22? In-Reply-To: <4905FC6E.1020805@probo.com> References: <4901F974.405@probo.com> <956003ae0810241104s1a300512kcb29163bf0a18e99@mail.gmail.com> <4902E8F0.6040505@t-online.de> <4905FC6E.1020805@probo.com> Message-ID: <490639B7.8050808@t-online.de> Tim Roberts schrieb: > Paolo G. Cantore wrote: > >> Every day we are sending out several thousands of emails with an >> attachment of >> PDF documents generated with Reportlab Toolkit (PageCompression enabled). >> >> When I was trying to upgrade from version 1.20 to 2.2 our customers >> where not >> able to open the documents with Adobe Reader anymore. Only a blank >> page was >> diplayed. >> >> I had to go back to version 1.20 immediately to prevent more complaints. >> >> After a series of tests I found a possible reason. With >> PageCompression enabled >> the whole content of the document was put on a single line (length >> ~28.000 chars). >> >> But in version 1.20 the compressed content is splitted into lines with >> a length >> of 60 characters ending with ^M (x'0d' = carriage return). This worked >> fine >> for all of our customers. >> > > Why does this matter? How are you encoding the file for attachment? > Aren't you using base64? > > PDF is a binary format. Quoted-printable might work, but I would think > anything other than base64 was just asking for trouble. > > Historically we used no encoding and most of the traffic is still unencoded. This works for more than 80% of our users. I agree totally with you about base64 encoding. But it's a big mess to deal with so different beasts as firewalls, spamfilters, virus scanning programs, mail servers and mail clients. We could not find a generally usable encoding method. Some costumers complained of base64 encoding others of zip encoding and others of no encoding. I appreciate your suggestion to use base64 as the standard encoding when moving to Reportlab 2.2. Maybe this way we'll reach 85% - 90% of our customers. I'll give it a try. Thank you for your help. From ralsina at netmanagers.com.ar Mon Oct 27 20:06:58 2008 From: ralsina at netmanagers.com.ar (Roberto Alsina) Date: Mon, 27 Oct 2008 22:06:58 -0200 Subject: [reportlab-users] Has PageCompression changed from RL12 to RL22? In-Reply-To: <490639B7.8050808@t-online.de> References: <4905FC6E.1020805@probo.com> <490639B7.8050808@t-online.de> Message-ID: <200810272207.00848.ralsina@netmanagers.com.ar> On Monday 27 October 2008 19:59:19 Paolo G. Cantore wrote: > Historically we used no encoding and most of the traffic is still > unencoded. This works for more than 80% of our users. > > I agree totally with you about base64 encoding. But it's a big > mess to deal with so different beasts as firewalls, spamfilters, > virus scanning programs, mail servers and mail clients. > > We could not find a generally usable encoding method. Some > costumers complained of base64 encoding others of zip > encoding and others of no encoding. > > I appreciate your suggestion to use base64 as the standard > encoding when moving to Reportlab 2.2. Maybe this way > we'll reach 85% - 90% of our customers. I'll give it a try. What exactly are your clients reading mail with that can't handle MIME messages with base64 encoding? There has not been a email client released in the last 10 (probably 14) years that doesn't support that. -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan From thaque at affsys.com Tue Oct 28 16:21:33 2008 From: thaque at affsys.com (Tariq Haque) Date: Tue, 28 Oct 2008 16:21:33 -0400 Subject: [reportlab-users] Multithreading Support Message-ID: <4B62C939BA3DEA45B2F3F3E6A987001A06C9FCC6@affmail01.affsys.com> Hello Everyone, I am evaluating the ReportLab PDF library 2.0 for a project. I want to find out if multithreading is supported in the PDF library 2.0 (and all its packages like pdfgen and platypus). Thanks Tariq -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Tue Oct 28 16:46:21 2008 From: timr at probo.com (Tim Roberts) Date: Tue, 28 Oct 2008 13:46:21 -0700 Subject: [reportlab-users] Multithreading Support In-Reply-To: <4B62C939BA3DEA45B2F3F3E6A987001A06C9FCC6@affmail01.affsys.com> References: <4B62C939BA3DEA45B2F3F3E6A987001A06C9FCC6@affmail01.affsys.com> Message-ID: <49077A1D.1070603@probo.com> Tariq Haque wrote: > > > > I am evaluating the ReportLab PDF library 2.0 for a project. I want to > find out if multithreading is supported in the PDF library 2.0 (and > all its packages like pdfgen and platypus). > You need to be more specific. It is almost impossible to imagine an environment in which different parts of a single document would be created in different threads. There's almost no global data, so you should be able to create different documents in different threads, one per thread, but there's no thread locking in the code. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From andy at reportlab.com Wed Oct 29 01:15:31 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 29 Oct 2008 05:15:31 +0000 Subject: [reportlab-users] SVN and other changes Message-ID: <956003ae0810282215n26807d2ag893fb85eea0f27d2@mail.gmail.com> Hi everyone, I'm sorry we have not been able to take part in the constructive discussions this week. We moved offices a week ago, and our broadband company were both late, and unable to deliver some key parts of their connection, which has forced Robin and others into some major and unplanned rearrangements of our mail, code hosting and backup infrastructure. We should be out of the woods by Monday, after which we can make arrangements for SVN access for those needing it, and get back to some of the issues on the tracker. I've also been in the Middle East with many meetings and limited time to follow the lists. Please bear with us a little longer - we have had an exceptional two weeks. Once these network moves are out of the way, we expect to move a lot faster on open source development and infrastructure. Best Regards, -- Andy Robinson CEO/Chief Architect ReportLab Europe Ltd. 3 Palmerston Road, Wimbledon, London SW19 1PG, UK Tel +44-20-8545-1570 From andy at reportlab.com Wed Oct 29 01:17:19 2008 From: andy at reportlab.com (Andy Robinson) Date: Wed, 29 Oct 2008 05:17:19 +0000 Subject: [reportlab-users] SVN and other changes In-Reply-To: <956003ae0810282215n26807d2ag893fb85eea0f27d2@mail.gmail.com> References: <956003ae0810282215n26807d2ag893fb85eea0f27d2@mail.gmail.com> Message-ID: <956003ae0810282217l1631d87dp3e85f5a785e49088@mail.gmail.com> 2008/10/29 Andy Robinson : > Hi everyone, > > I'm sorry we have not been able to take part in the constructive > discussions this week. > Forgot my main point: Subversion will be down, possibly for a day or two, and may re-emerge under the new name "svn.reportlab.com" with new certificates and IP address. Robin will advise you when this starts. - Andy From dirk.holtwick at gmail.com Wed Oct 29 09:13:17 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Wed, 29 Oct 2008 14:13:17 +0100 Subject: [reportlab-users] [BUG] Table cell too big In-Reply-To: <48FF405E.3000106@gmail.com> References: <48FF405E.3000106@gmail.com> Message-ID: <4908616D.30807@gmail.com> Any new informations on this? Is there another way to avoid errors with too large table cells? An answer would be very appreciated. Thanks. Dirk Dirk Holtwick schrieb: > Hi, > > there is an old issue with Reportlab tables that you get an error if a > table cell is larger than the page itself, because a table cell will not > be splitted inside. The traceback looks somewhat like this > > -----------------8<---------------[cut here] > ... > File > "F:\work\xhtml2pdf-30\env-reportlab21-python24\lib\site-packages\reportlab\platypus\doctemplate.py", > line 740, in build > self.handle_flowable(flowables) > File > "F:\work\xhtml2pdf-30\env-reportlab21-python24\lib\site-packages\reportlab\platypus\doctemplate.py", > line 671, in handle_flowable > raise LayoutError(ident) > LayoutError: Flowable with > cell(0,0) containing > u'\xa0Problem identified' too large on page 4 > -----------------8<---------------[cut here] > > > The only work around I found is to wrap the content of the table call > with KeepInFrame() so that e.g. the content shrinks to fit. This is not > a very good solution. > > Are there other ways to work around this problem? Is splitting of table > cells planned? > > Cheers > Dirk From robin at reportlab.com Wed Oct 29 12:30:26 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 29 Oct 2008 16:30:26 +0000 Subject: [reportlab-users] new SVN location Message-ID: <49088FA2.6020301@chamonix.reportlab.co.uk> Our SVN repositories have been relocated in space and domain to svn.reportlab.com the best way to adjust is to use the --relocate option for svn switch. so for https://www.reportlab.co.uk/svn use svn switch --relocate \ https://www.reportlab.co.uk/svn \ https://svn.reportlab.com/svn for http://www.reportlab.co.uk/svn use svn switch --relocate \ http://www.reportlab.co.uk/svn \ http://svn.reportlab.com/svn when things have stabilized and we will be adding some place for people to experiment on a branch. -- Robin Becker From alet at librelogiciel.com Wed Oct 29 13:46:05 2008 From: alet at librelogiciel.com (alet at librelogiciel.com) Date: Wed, 29 Oct 2008 18:46:05 +0100 Subject: [reportlab-users] new SVN location In-Reply-To: <49088FA2.6020301@chamonix.reportlab.co.uk> References: <49088FA2.6020301@chamonix.reportlab.co.uk> Message-ID: <20081029174605.GC2034@vazy.pykota.com> On Wed, Oct 29, 2008 at 04:30:26PM +0000, Robin Becker wrote: > Our SVN repositories have been relocated in space and domain to > > svn.reportlab.com > > the best way to adjust is to use the --relocate option for svn switch. > > so > > for https://www.reportlab.co.uk/svn use > > svn switch --relocate \ > https://www.reportlab.co.uk/svn \ > https://svn.reportlab.com/svn > > for http://www.reportlab.co.uk/svn use > > svn switch --relocate \ > http://www.reportlab.co.uk/svn \ > http://svn.reportlab.com/svn > > when things have stabilized and we will be adding some place for people to > experiment on a branch. Any way to download anonymously ? svn keeps asking me for an username and password. bye Jerome Alet From robin at reportlab.com Wed Oct 29 14:11:54 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 29 Oct 2008 18:11:54 +0000 Subject: [reportlab-users] new SVN location In-Reply-To: <20081029174605.GC2034@vazy.pykota.com> References: <49088FA2.6020301@chamonix.reportlab.co.uk> <20081029174605.GC2034@vazy.pykota.com> Message-ID: <4908A76A.1020300@chamonix.reportlab.co.uk> alet at librelogiciel.com wrote: ......... > > Any way to download anonymously ? > > svn keeps asking me for an username and password. > > bye > > Jerome Alet ....... that must be some kind of apache issue. I'll take a look tomorrow. -- Robin Becker From robin at reportlab.com Wed Oct 29 14:11:54 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 29 Oct 2008 18:11:54 +0000 Subject: [reportlab-users] new SVN location In-Reply-To: <20081029174605.GC2034@vazy.pykota.com> References: <49088FA2.6020301@chamonix.reportlab.co.uk> <20081029174605.GC2034@vazy.pykota.com> Message-ID: <4908A76A.1020300@chamonix.reportlab.co.uk> alet at librelogiciel.com wrote: ......... > > Any way to download anonymously ? > > svn keeps asking me for an username and password. > > bye > > Jerome Alet ....... that must be some kind of apache issue. I'll take a look tomorrow. -- Robin Becker From robin at reportlab.com Wed Oct 29 14:11:54 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 29 Oct 2008 18:11:54 +0000 Subject: [reportlab-users] new SVN location In-Reply-To: <20081029174605.GC2034@vazy.pykota.com> References: <49088FA2.6020301@chamonix.reportlab.co.uk> <20081029174605.GC2034@vazy.pykota.com> Message-ID: <4908A76A.1020300@chamonix.reportlab.co.uk> alet at librelogiciel.com wrote: ......... > > Any way to download anonymously ? > > svn keeps asking me for an username and password. > > bye > > Jerome Alet ....... that must be some kind of apache issue. I'll take a look tomorrow. -- Robin Becker From robin at reportlab.com Wed Oct 29 14:11:54 2008 From: robin at reportlab.com (Robin Becker) Date: Wed, 29 Oct 2008 18:11:54 +0000 Subject: [reportlab-users] new SVN location In-Reply-To: <20081029174605.GC2034@vazy.pykota.com> References: <49088FA2.6020301@chamonix.reportlab.co.uk> <20081029174605.GC2034@vazy.pykota.com> Message-ID: <4908A76A.1020300@chamonix.reportlab.co.uk> alet at librelogiciel.com wrote: ......... > > Any way to download anonymously ? > > svn keeps asking me for an username and password. > > bye > > Jerome Alet ....... that must be some kind of apache issue. I'll take a look tomorrow. -- Robin Becker From H.vonBargen at t-p.com Thu Oct 30 04:11:59 2008 From: H.vonBargen at t-p.com (Henning von Bargen) Date: Thu, 30 Oct 2008 09:11:59 +0100 Subject: [reportlab-users] [BUG] Table cell too big In-Reply-To: Message-ID: <77A9E75DA75C564D82BDC4B18A7D852530562C@ROHRPOSTIX.tup.ads> > From: Dirk Holtwick > Subject: Re: [reportlab-users] [BUG] Table cell too big > > Any new informations on this? > Is there another way to avoid errors with too large table cells? I don't think so. You'd have to extend the Table class. Henning From dirk.holtwick at gmail.com Thu Oct 30 04:24:03 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Thu, 30 Oct 2008 09:24:03 +0100 Subject: [reportlab-users] [BUG] Table cell too big In-Reply-To: <77A9E75DA75C564D82BDC4B18A7D852530562C@ROHRPOSTIX.tup.ads> References: <77A9E75DA75C564D82BDC4B18A7D852530562C@ROHRPOSTIX.tup.ads> Message-ID: <49096F23.8040103@gmail.com> Henning von Bargen schrieb: >> From: Dirk Holtwick >> Subject: Re: [reportlab-users] [BUG] Table cell too big >> >> Any new informations on this? >> Is there another way to avoid errors with too large table cells? > > I don't think so. You'd have to extend the Table class. Thanks Henning. I have spend some time on this issue and finally I did a dirty hack to give the "KeepInFrame" elements automatically the maximum sizes available. Anyone interested can have a look at the the results in my XHTML2PDF code in SVN: I think the whole table implementation could gain from a redesign and rewrite. After having a closer look at the guts of Reportlab I am missing well documented code and self speaking variable names. I can therefore imagine that it is difficult to maintain this code. But this is normal for a "grown" project but maybe at some point comes the time to do a rewrite to get efficiency back in the development. But anyways, for me it works now and that's all I need for the moment. BTW: I also did some changes to the paragraph implementation because underlinings and strikes where not very aware of the current font sizes used. Hope we get three get in the new paragraph implementation soon once the SVN of Reportlab is open for us. Dirk From gherman at darwin.in-berlin.de Thu Oct 30 05:08:43 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Thu, 30 Oct 2008 10:08:43 +0100 Subject: [reportlab-users] [BUG] Table cell too big In-Reply-To: <49096F23.8040103@gmail.com> References: <77A9E75DA75C564D82BDC4B18A7D852530562C@ROHRPOSTIX.tup.ads> <49096F23.8040103@gmail.com> Message-ID: Dirk Holtwick: > But anyways, for me it works now and that's all I need > for the moment. Sounds all too familiar... And that's probably exactly why so much code is in the state it is. ;-) Dinu From gherman at darwin.in-berlin.de Thu Oct 30 05:11:11 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Thu, 30 Oct 2008 10:11:11 +0100 Subject: [reportlab-users] Bug report: User guide has no TOC Message-ID: <8683B41D-EE7E-46BA-8CFD-C24725F38F60@darwin.in-berlin.de> Hi, ok, this is perhaps rather a feature request, but since the user guide is supposed to show all "tricks of the trade" I think a table of contents should be one of them. Regards, Dinu From robin at reportlab.com Thu Oct 30 13:08:21 2008 From: robin at reportlab.com (Robin Becker) Date: Thu, 30 Oct 2008 17:08:21 +0000 Subject: [reportlab-users] new SVN location In-Reply-To: <20081029174605.GC2034@vazy.pykota.com> References: <49088FA2.6020301@chamonix.reportlab.co.uk> <20081029174605.GC2034@vazy.pykota.com> Message-ID: <4909EA05.300@chamonix.reportlab.co.uk> alet at librelogiciel.com wrote: >........ > > svn keeps asking me for an username and password. > > bye > > Jerome Alet ....... Jerome, I thought I must have broken the httpd.conf settings so reverted to an older version. It seems the settings were the same so I tried svn co http://svn.reportlab.com/svn/public/reportlab/trunk/src and that works fine for me (also https version) without any password. You'll get queried for attempts to just checkout the top level /svn though. I believe /svn/public is readable without checks. -- Robin Becker From cfoster at oda.state.or.us Thu Oct 30 14:57:36 2008 From: cfoster at oda.state.or.us (Chris Foster) Date: Thu, 30 Oct 2008 11:57:36 -0700 Subject: [reportlab-users] underlines and horizontal spacing Message-ID: <8ABA47C7-7EA5-4729-B902-F42223FE8C52@oda.state.or.us> I'm using intra-paragraph markup (...) for underlines and my users aren't happy with the line extending into the space between words. (It actually looks OK to me, but they're picky.) Is there a better way to do underlining or maybe get more spacing between words? From cfoster at oda.state.or.us Thu Oct 30 15:08:23 2008 From: cfoster at oda.state.or.us (Chris Foster) Date: Thu, 30 Oct 2008 12:08:23 -0700 Subject: [reportlab-users] limits of KeepTogether() ? Message-ID: <0C5B716A-815F-4F17-8EE7-D89F12470AE3@oda.state.or.us> I'm not having much luck with KeepTogether(). The manual says it "attempts to keep them in the same Frame". Is there a way of predicting successful "attempts?" I have reports with mixed dynamic content (data) and worksheet sections. When the worksheets split across pages, it is a little confusing. I'm thinking tables and headings might be the best way to keep context across unintended splits. Are there other alternatives? -------------- next part -------------- An HTML attachment was scrubbed... URL: From alet at librelogiciel.com Thu Oct 30 16:46:23 2008 From: alet at librelogiciel.com (alet at librelogiciel.com) Date: Thu, 30 Oct 2008 21:46:23 +0100 Subject: [reportlab-users] new SVN location In-Reply-To: <4909EA05.300@chamonix.reportlab.co.uk> References: <49088FA2.6020301@chamonix.reportlab.co.uk> <20081029174605.GC2034@vazy.pykota.com> <4909EA05.300@chamonix.reportlab.co.uk> Message-ID: <20081030204623.GB3355@vazy.pykota.com> On Thu, Oct 30, 2008 at 05:08:21PM +0000, Robin Becker wrote: > > Jerome, I thought I must have broken the httpd.conf settings so reverted to > an older version. It seems the settings were the same so I tried > > > svn co http://svn.reportlab.com/svn/public/reportlab/trunk/src > > and that works fine for me (also https version) without any password. Works fine ! Thanks Jerome From H.vonBargen at t-p.com Fri Oct 31 04:30:18 2008 From: H.vonBargen at t-p.com (Henning von Bargen) Date: Fri, 31 Oct 2008 09:30:18 +0100 Subject: [reportlab-users] underlines and horizontal spacing Message-ID: <77A9E75DA75C564D82BDC4B18A7D8525305632@ROHRPOSTIX.tup.ads> Chris Foster wrote: > I'm using intra-paragraph markup (...) for underlines and my > users aren't happy with the line extending into the space between > words. (It actually looks OK to me, but they're picky.) Is there a > better way to do underlining or maybe get more spacing between words? You might try the Paragraph class from wordaxe.rl.NewParagraph (which will also be used by default as if you say from wordaxe.rl.Paragraph import Paragraph) from the wordaxe-0.3.0 release (http://deco-cow.sourceforge.net). This implementation handles spaces explicitly, whereas the reportlab.platypus.Paragraph implementation only stores the words (not the spaces inbetween). Using the wordaxe implementation, you can use Paragraph("Only words are underlined.", style) This is untested, but should work as expected. For more spacing between words, you probably have to do some coding, because the current implementation converts multiple spaces to a single space. Or you could use a transparent inline image with . Take a look at Dinu Gherman's alternative paragraph implementation, too. Henning From dirk.holtwick at gmail.com Fri Oct 31 04:41:19 2008 From: dirk.holtwick at gmail.com (Dirk Holtwick) Date: Fri, 31 Oct 2008 09:41:19 +0100 Subject: [reportlab-users] underlines and horizontal spacing In-Reply-To: <8ABA47C7-7EA5-4729-B902-F42223FE8C52@oda.state.or.us> References: <8ABA47C7-7EA5-4729-B902-F42223FE8C52@oda.state.or.us> Message-ID: <490AC4AF.6010702@gmail.com> Hi Chris, I would also like to advertise my open source product XHTML2PDF for this. It also does what you expect the markup to do since it uses a full featured parser that also handles CSS informations. Give it a try in the online demo to find out if it fits your needs: Dirk Chris Foster schrieb: > I'm using intra-paragraph markup (...) for underlines and my > users aren't happy with the line extending into the space between > words. (It actually looks OK to me, but they're picky.) Is there a > better way to do underlining or maybe get more spacing between words? > _______________________________________________ > reportlab-users mailing list > reportlab-users at reportlab.com > http://two.pairlist.net/mailman/listinfo/reportlab-users From darren at ontrenet.com Fri Oct 31 12:14:33 2008 From: darren at ontrenet.com (Darren Govoni) Date: Fri, 31 Oct 2008 16:14:33 +0000 Subject: [reportlab-users] Add comments to PDF? Message-ID: <1225469673.6979.55.camel@nuraku> Hi, Does report lab API support adding comments or other metadata inside the PDF so when it is viewed in Adobe Reader, the comments show up in the comments tab? thanks, Darren