[reportlab-users] Newbie -- How to center text in a paragraph

Jim Steil jim at qlf.com
Thu Jun 22 16:25:17 EDT 2006


Is there a doc somewhere that details all of the styles available?

	-Jim

Jim Steil
IT Manager
Quality Liquid Feeds
(608) 935-2345 
(608) 341-9896 cell
-----Original Message-----
From: reportlab-users-bounces at reportlab.com
[mailto:reportlab-users-bounces at reportlab.com] On Behalf Of Henrique Romano
Sent: Thursday, June 22, 2006 3:17 PM
To: Support list for users of Reportlab software
Subject: Re: [reportlab-users] Newbie -- How to center text in a paragraph

Jim Steil wrote:
>
> Hi:
>
> I'm REAL new to reportlab and am trying to center my text in a 
> paragraph. I've found the XML markup and have the following code:
>
> styles = getSampleStyleSheet()
>
> style = styles['Normal']
>
> s5Text1 = '<para alignment="1"><i><b>QLF PRESERVATIVES AND MOLD 
> INHIBITORS</b></i></para>'
>
> section5P1 = Paragraph(s5Text1, style)
>
> story5 = []
>
> story5.append(section5P1)
>
> frame5.addFromList(story5, canvas)
>
You can try using the "alignment" property of ParagraphStyle, or use
a style that is already aligned (like the 'Title' one).


--
Henrique

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




More information about the reportlab-users mailing list