[reportlab-users] How to write text upside down?
Gregory Piñero
gregpinero at gmail.com
Sat Dec 1 23:03:13 EST 2007
I'm trying to write some text, one string I want to put upside down
since the printed document is meant to be folded.
Here's what I'm currently trying, with calling c.rotate(180) but no
text seems to show up on the document after I call that.
def write_text(c,front_text,inside_text):
c.setFillColor(black)
c.setFont("Helvetica", 22)
c.drawCentredString(3*(width/4), int(.4*height), front_text) #want
right side up
c.setFont("Helvetica", 18)
c.rotate(180) #write text upside down so it's right when folded.
c.drawCentredString(width/4, int(.75*height), inside_text) #want upside down
c.setFont("Helvetica", 8)
c.drawCentredString(width/4, int(.13*height),
"Created while fondly thinking of you at") #want right side up
Is there a different method I should be using?
Thanks again,
Greg
More information about the reportlab-users
mailing list