[reportlab-users] Paragraph and blank lines

Peter Milliken peter.milliken at gmail.com
Mon Jun 28 20:39:35 EDT 2010


Sorry if this has been asked before, newbie question - but there isn't any
search function on the mailing list?

I am just starting with reportlab and am sending some text strings using
Paragraph - everything is printing out fine with the exception of 'blank'
lines i.e. lines which only contain only a CR (I have tried various
combinations of LF, LFCR and just CR with the same results) are NOT being
printed.

The description for Paragraph in the Users guide states (in part):

"The text argument contains the text of the paragraph; excess white space is
removed from the text at the ends and internally after linefeeds."

which I would take to mean that a text argument that contains ONLY a
linefeed should be fine - but apparently not, any lines with just a linefeed
(or any of the above combinations) are not being printed in the PDF
document. I have even tried inserting a space character BEFORE the linefeed
but it still seems to be deleted from the PDF.

What am I doing wrong?

Conversely, if this is a "feature" of Paragraph then how do I insert a Space
with the correct vertical spacing? i.e. for different fonts and font sizes I
would have to calculate the vertical space in inches - how do I discover the
font height at 'runtime'?

Thanks
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20100629/55eade34/attachment.html>


More information about the reportlab-users mailing list