[reportlab-users] sizes of fonts and images
luc.saffre at gmx.net
Mon Oct 23 16:26:14 EDT 2006
I try to render a text in monospaced font together with an image.
And I want the image to be exactly as wide as the line of text.
Images and fonts apparently use different units because the following
script renders the image too big (its width is about 1.5 times the text
from reportlab.pdfgen import canvas
from reportlab.lib.units import mm
canvas = canvas.Canvas(filename)
canvas.setFont("Courier", 10, leading=11)
How must I specify the with of my image if I know that it must be 30
characters wide, and that the font size is 10?
Thanks for any ideas.
More information about the reportlab-users