[reportlab-users] Is borderPadding supposed to do this?

Roberto Alsina ralsina at netmanagers.com.ar
Fri May 29 10:25:59 EDT 2009


Trying this program:

from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import ParagraphStyle

def go():
Story=[]
doc = SimpleDocTemplate("phello.pdf")
style =
ParagraphStyle(name='border',textColor='#ff0000',backColor='#00ff00',borderPadding=40,
borderWidth=2)
p = Paragraph('This is a paragraph', style)
Story.append(p)
p = Paragraph('This is the second paragraph', style)
Story.append(p)
doc.build(Story)

go()

I expected to see two largish paragraphs in ugly colours, with big padding,
one below the other.

What I got was the second paragraph drawn over the first one.

--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)
"Our opponent is an alien starship packed with atomic bombs, I said.
We have a protractor. Okay, I’ll go home and see if I can scrounge up a
ruler and a piece of string." — Neal Stephenson


More information about the reportlab-users mailing list