[reportlab-users] Styling within platypus flowables

Nick Moffitt nick+chordlab at zork.net
Sun Feb 16 17:23:54 EST 2014

Robin Becker:

> Swing <onDraw name="myDrawChord" label="D"/>low, sweet <onDraw

> name="myDrawChord" label="G"/>chari<onDraw name="myDrawChord"

> label="D"/>ot,


> So effectively the onDraw callable has to have a signature like this


> def myDrawChord(canv,kind,label):

Thank you for passing all this boilerplate to me! I'll have a tinker
with this approach. I was also looking into writing my own "flowable"
for a stanza object, which may turn out to be the best option if I can
crib or subclass what the paragraph does.

> I'm not sure exactly how the splitting will work with this scheme as

> our fragment algorithm is quite contorted about where it likes to

> split when these zero width (onDraw) items appear ie they're not

> transparent so far as the linebreaking algoritm is concerned.

How much do you think it will count? Given the above example would you
expect it to be broken into three lines (as it was by my mailer) or do
only the label attribute contents count toward line length?

"No, I ain't got a fax machine! I also ain't got an
Apple IIc, polio, or a falcon!"
-- Ray, Achewood 2006-11-22

More information about the reportlab-users mailing list