[reportlab-users] Rotated paragraph/document with ReportLab (vertical text)
Jesus Sanchez-Palencia
jesus at eventick.com.br
Thu Oct 25 09:16:56 EDT 2012
Hi!
I'm trying to get something like the following snippet to actually
draw this document rotated by 90 degrees. The pagesize is already the
way I want it in the end, but the text is still horizontal. How can I
rotate the text making it vertical?
What I want in the end is something similar to calling
canvas.rotate(90) and then canvas.drawString(), but I want to take
the advantage of word wrapping from Paragraph...
---------- SNIPPET ----------
style = getSampleStyleSheet()
normal = style["Normal"]
normal.alignment = TA_CENTER
normal.fontName = "Helvetica"
normal.fontSize = 15
pdf = SimpleDocTemplate("testplatypus.pdf", pagesize = (80, 250),
rightMargin=10, leftMargin=10, topMargin=20,bottomMargin=20)
story = []
text = "I really need this to be wrapped and vertical!"
para = Paragraph(text, normal)
story.append(para)
pdf.build(story)
More information about the reportlab-users
mailing list