[reportlab-users] Paragraph, text and spaces
peter.milliken at gmail.com
Thu Jul 1 19:17:00 EDT 2010
Still playing with reportlab :-)
I am trying to print strings of text using Paragraph. These strings are
lines of code listings so they include spaces to show indentation (spaces -
not tabs). When I 'print' the document all of the spacing/ indentation has
been removed! i.e.
comes out as:
The description for Paragraph states:
"The following text creates an instance of the Paragraph class:
Paragraph(text, style, bulletText=None)
The text argument contains the text of the paragraph; excess white space is
removed from the text at the
ends and internally after linefeeds."
I am more than happy with excess white space removed from the end of the
line of text, but why am I seeing white space removed from the beginning? it
certainly doesn't tie in with the rest of the description for Paragraph that
"This allows easy use of indented triple quoted text in Python scripts."
because when I attempted to "print" an indented triple quoted Python comment
it also saw the leading spaces removed!
Any help of what I am doing wrong would be greatly appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the reportlab-users