[reportlab-users] Re: reportlab-users Digest, Vol 24, Issue 10
Yordanka Budinova
d.budinova at gmail.com
Thu Aug 24 07:00:15 EDT 2006
You must have a Paragraph(text).
2006/8/23, reportlab-users-request at reportlab.com <
reportlab-users-request at reportlab.com>:
>
> Send reportlab-users mailing list submissions to
> reportlab-users at reportlab.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://two.pairlist.net/mailman/listinfo/reportlab-users
> or, via email, send a message with subject or body 'help' to
> reportlab-users-request at reportlab.com
>
> You can reach the person managing the list at
> reportlab-users-owner at reportlab.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of reportlab-users digest..."
>
>
> Today's Topics:
>
> 1. outage (Robin Becker)
> 2. Re: Re: Getting the number of lines in a frame
> (Saketh Bhamidipati)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 23 Aug 2006 12:23:49 +0100
> From: Robin Becker <robin at reportlab.com>
> Subject: [reportlab-users] outage
> To: USERS REPORTLAB <reportlab-users at reportlab.com>
> Message-ID: <44EC3AC5.1050108 at chamonix.reportlab.co.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> There will be an outage shortly on this list and the www.reportlab.co.ukserver
> for a hardware upgrade.
> --
> Robin Becker
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 23 Aug 2006 10:33:35 -0400
> From: "Saketh Bhamidipati" <saketh.bhamidipati at gmail.com>
> Subject: Re: [reportlab-users] Re: Getting the number of lines in a
> frame
> To: "Support list for users of Reportlab software"
> <reportlab-users at reportlab.com>
> Message-ID:
> <65339c410608230733s2a44bd50u40521f0f9a0b1484 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On 8/22/06, Saketh Bhamidipati <saketh.bhamidipati at gmail.com> wrote:
> >
> >
> >
> > On 8/22/06, Andy Robinson <andy at reportlab.com> wrote:
> > >
> > > Saketh Bhamidipati wrote:
> > > >
> > > > I need to create documents with headings on the left side and text
> on
> > > > the right side, the headings aligned with the text.
> > > >
> > > > Perhaps you should say what you try to achieve - there
> > > > may be different ways to achieve your goals without the
> > > > need to count the number of lines.
> > > >
> > > > Henning
> > > >
> > >
> > > Henning is right. Pretend it's HTML!
> > >
> > > Each time you need to create a new heading, make a two-cell table with
> > > one row. Put a heading paragraph in the left cell, and as many
> > > paragraphs as you want in the right cell. Then add this to the story.
> > >
> > > This will also encourage the page breaks to happen in nice places,
> since
> > >
> > > a single table cell is never split.
> > >
> > > Look at reportlab/test/test_platypus_tables.py and its output for
> > > examples of code to build tables.
> > >
> > > Hope this helps,
> > >
> > >
> > > Andy Robinson
> > > CEO/Chief Architect
> > >
> > > _______________________________________________
> > > reportlab-users mailing list
> > > reportlab-users at reportlab.com
> > > http://two.pairlist.net/mailman/listinfo/reportlab-users
> > >
> > That sounds a lot better than what I was doing. I'll try the table
> method,
> > then.
> >
> > Thanks for your help.
> >
> > -Saketh
> >
> I'm having some trouble getting the right column to wrap properly. I want
> a
> table of 2-inch width on the left, and 6-inch width on the right. Here is
> my
> code:
>
> ...
> self.style = TableStyle([
> ('TOPPADDING', (0, 0), (-1, -1), 0),
> ('BOTTOMPADDING', (0, 0), (-1, -1), 0),
> ('LEADING', (0, 0), (-1, -1), 10),
> ('FONTSIZE', (0, 0), (-1, -1), 10),
> ('ALIGN', (0, 0), (-1, -1), 'LEFT')])
>
> def addTextAndHeading(self, text, heading):
> # Called thrice for testing the LEADING and PADDING style options
> data = (heading, text), (heading, text), (heading, text)
>
> self.story.append(Table(data, colWidths=(2 * inch, 6 * inch),
> style=self.style))
>
> Now, instead of writing the text and headings separately, I write them
> together at once in a Table. Though the TableStyle is working well, the
> Table is not; the right column is not wrapping its text. I tested it out
> with an addTextAndHeading("text"*100, "heading"), but the
> texttextexttext[...] runs off the end of the page and doesn't wrap. Since
> the right column width is 6 inches, I thought it would wrap after going
> for
> 6 inches of text.
>
> How can I get the right column to wrap?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://two.pairlist.net/pipermail/reportlab-users/attachments/20060823/92a6a81f/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>
>
> End of reportlab-users Digest, Vol 24, Issue 10
> ***********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20060824/49024767/attachment-0001.html
More information about the reportlab-users
mailing list