[reportlab-users] text of paragraph sits at bottom of area.
Kerri Reno
kreno at yumaed.org
Fri Mar 13 13:22:01 EDT 2009
I'm creating a pay stub with reportlab, that has to fit on one page. I
started with Jeff Bauer's hcfa1500.py from the reportlab web site - THANKS
JEFF! I was able to modify it to fit my needs, even including a couple of
paragraphs. My problem is that the paragraphs print in the bottom of the
allowed area.
I'm using
stylesheet = getSampleStyleSheet()
style = stylesheet['Normal']
style.fontName=self.text_font
style.fontSize = self.text_size
style.leading = int(self.text_size * 1.2)
c = self.canvas
# x, y = bottom left corner of area
# width and height are the maximum area I want the
# paragraph to use up
p = Paragraph(v,style)
f = KeepInFrame(width,height,[p],mode='shrink')
f.wrapOn(c,width,height)
f.drawOn(c,x,y)
This works great, except if the text of the paragraph doesn't take up all
the space, then it prints in the bottom portion of the area.
I've searched the documentation and the web for an answer, and I just can't
find it. I'd appreciate any help you can give me.
Thanks in Advance!
Kerri
--
Yuma Educational Computer Consortium
Compass Development Team
Kerri Reno
kreno at yumaed.org (928) 502-4240
.·:*¨¨*:·. .·:*¨¨*:·. .·:*¨¨*:·.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20090313/ca96f8c8/attachment.htm>
More information about the reportlab-users
mailing list