[reportlab-users] Use of context/style in Paragraph from para
module
Robin Becker
robin at reportlab.com
Wed Jan 25 06:20:27 EST 2006
Remi Cool wrote:
> With the 'old' Paragraph class, I could set a style and it was rendered
> using that style. In Paragraph (from para), the style property has no
> real effect on the rendering (I tested it with fontSize). When I pass my
> stylesheet to the context parameter, my own styles get lost and only the
> predefined style names in DEFAULT_ALIASES can be used in a <para style
> attribute.
>
> Is it possible to override this 'context' feature or how can I use
> context so that I can use my own styles?
>
> I haven't solved the problem I have with centered text not being
> centered. Is the <para alignment="center"> notation still correct?
>
> - Remi -
>
.....
para was an additional paragrapher and I'm not certain if it supports the same
tags as Paragraph. My reading of the code seems to suggest that you should
create the para object and then set its alignment to TA_CENTER, pass the
alignment in as part of the style alignment="left'/"center" etc or use the above
notation. However, it doesn't seem to work as advertised. I'll take a look later.
--
Robin Becker
More information about the reportlab-users
mailing list