[reportlab-users] How to specify a width for a Paragraph flowable.

Andy Robinson andy at reportlab.com
Mon Jun 7 08:32:36 EDT 2010


On 4 June 2010 20:56, shawn a <boris317 at gmail.com> wrote:

> Is it possible to define a width for a Paragraph flowable? Currently

> it wants to take up all the horizontal space it can.


That's the whole idea of a Flowable ;-)

If you are making a flowing document, and you know the width of the
frame, and you want the paragraph to be less wide than this, you can
set the leftIndent and rightIndent properties on the paragraph style
to move it in from the margins.

If you are not bothering with flowing content much and just want to
position a paragraph on a page which you are drawing in 'canvas mode'
- for example a paragraph of small print at the bottom of an invoice,
you can explicitly call its 'wrap' method with the available height
and width you want to give it, then call 'draw'.


--
Andy Robinson
CEO/Chief Architect
ReportLab Europe Ltd.
Media House, 3 Palmerston Road, Wimbledon, London SW19 1PG, UK
Tel +44-20-8545-1570


More information about the reportlab-users mailing list