[reportlab-users] intra-paragraph backcolor?

Tim Roberts timr at probo.com
Wed Jan 5 19:26:54 EST 2011


Jon.Reinsch wrote:

>> you should be able to do this with a <font backColor='yellow'>my

>> yellow text</font> inside the paragraph text

> I tried that, as follows:

>

> from reportlab.lib.styles import getSampleStyleSheet

> from reportlab.platypus import *

> styles = getSampleStyleSheet()

> elements = []

> text = "We all live in a <font backColor='yellow'>yellow</font> submarine."

> p = Paragraph(text,styles["Normal"])

> elements.append(p)

> doc = SimpleDocTemplate("yellow.pdf")

> doc.build(elements)

>

> However, it doesn't work. Have I made some obvious mistake?


Hmm, in the version I have, the parser looks for backColor, but the
renderer doesn't seem to use it...

--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list