[reportlab-users] Fwd: text of paragraph sits at bottom of area.

Kerri Reno kreno at yumaed.org
Mon Apr 6 10:39:24 EDT 2009


I sent this question last month. I'm sorry if I worded it badly or
something, but I got no response. Can anyone help me with this? I'm
writing a paragraph directly to a canvas, and the text is bottom oriented.
Please help me with this!

Kerri

---------- Forwarded message ----------
From: Kerri Reno <kreno at yumaed.org>
Date: Fri, Mar 13, 2009 at 11:22 AM
Subject: text of paragraph sits at bottom of area.
To: Support list for users of Reportlab software <
reportlab-users at reportlab.com>


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
.·:*¨¨*:·. .·:*¨¨*:·. .·:*¨¨*:·.



--
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/20090406/a04a6194/attachment.html>


More information about the reportlab-users mailing list