[reportlab-users] Line numbers in Platypus

Jonathan Claggett jonathan at claggett.org
Wed Mar 19 11:29:16 EDT 2008


Hello,

I've just recently become aware of the RL toolkit (thus my first post to the
list :-) and I'm evaluating it for use in generating legal bills* for a
model UN youth organization.

One of the requirements of these bills is that the body has line numbers and
I'm not sure how or even if line numbering can occur with variable height
objects like the Paragraph. My initial reaction after reading the user
manual is 'probably'.

At a hand waving level, I think I can subclass the BaseDocTemplate to create
an afterFlowable method which determines how many lines a Paragraph or other
flowable has used (using the wrap method?) which I then use to draw a
sequence (maintained by the sequencer module) of line numbers in a separate
frame down the left hand margin.

Does this above approach sound reasonable? Maybe Platypus has a line
numbering feature already and I missed it? Perhaps someone has already
created a line numbering document template that I could use?

Thanks for any help you can provide.

Regards,
Jonathan

* e.g., http://jonathan.claggett.googlepages.com/sample-bill.pdf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20080319/51bc59a7/attachment.html>


More information about the reportlab-users mailing list