[reportlab-users] intra-paragraph backcolor?

Jon.Reinsch Jon.Reinsch at noaa.gov
Wed Jan 5 19:09:10 EST 2011

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

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

> -- Robin Becker

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"])
doc = SimpleDocTemplate("yellow.pdf")

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

Jon R

More information about the reportlab-users mailing list