[reportlab-users] Text padding differences between 2.1 release and trunk
Stevens, Ian
IStevens at globeandmail.com
Tue Feb 26 15:31:22 EST 2008
I've been working a little with the code from trunk and have noticed
some differences in how text is spaced in both trunk and release. I'm
not sure if this is a case of trunk fixing a bug in release, or a bug
being introduced into release. At any rate, attached is an image
illustrating the differences in output for the following code between
release and trunk.
Will I have to reconfigure all my paragraphs if I want to use trunk (or
its release candidate) or is there some way I can properly handle both?
Thanks,
Ian.
from reportlab.lib.units import inch
from reportlab.lib.styles import ParagraphStyle
from reportlab.platypus import Paragraph, Frame
from reportlab.platypus.flowables import HRFlowable
from reportlab.pdfgen import canvas
style1 = ParagraphStyle(None, fontSize=8, spaceAfter=5, spaceBefore=0,
leading=8)
style2 = ParagraphStyle(None, fontSize=18, spaceAfter=0, spaceBefore=0,
leading=20)
f = Frame(1*inch, 1*inch, 2*inch, 9*inch, showBoundary=True)
flow = []
flow.append(Paragraph('this is a multi-line test paragraph ' * 3,
style1))
flow.append(Paragraph('before rule', style2))
flow.append(HRFlowable(width='100%'))
flow.append(Paragraph('after rule', style2))
c = canvas.Canvas('reportlab_version_test.pdf')
f.addFromList(flow, c)
c.save()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: release-vs-trunk.PNG
Type: image/png
Size: 7741 bytes
Desc: release-vs-trunk.PNG
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20080226/bde0a06e/attachment-0001.png>
More information about the reportlab-users
mailing list