[reportlab-users] RE: Experience with new-style paragraphs?
Mon, 14 Oct 2002 11:06:28 +0100
> A paragraph should be considered as something like a
> "left-to-right, then
> top-down" container.
That is the right general model. It's also why I put some
'symmetry' into the wrap/draw API, so it could be used for 'inline'
flowables as well. However, doing word level stuff
in pure Python is a performance killer - we tried once. It would be
very interesting to prototype such a model, and then see how
suitable it was to optimization.
Also, PDF has primitives to do 'a line at a time' efficienctly;
it removes the need for the 'innermost layer' where we
position each word ourselves. This lets us go faster in
the degenerate cases where a whole line is all in one font
with no embedded objects. Any real implementation should do
this if possible.
The other 'internally consistent' approach is to say
it's all just a markup language with a black box to
render it. This makes many things easier and makes some
things harder. But that's also our main commercial product and
it would lead to much difficulty for everyone. I am comfortable
with the boundary that "it's free if you do it in Python".