[reportlab-users] ANN: wordaxe-0.2.6 released

Andy Robinson andy at reportlab.com
Wed Sep 17 01:55:16 EDT 2008


2008/9/16 <henning.vonbargen at arcor.de>:

> It would be a small step for you but a great step for developer-kind

> if at least the Paragraph class was more object-oriented.

> The current implementation uses a bunch of private functions that are

> NOT part of the Paragraph class - which requires to code duplication

> in derived classes:


You're right. We should at least be able to put all those functions
into methods with a leading underscore in an hour or two, and I doubt
it would affect performance. We'll tackle this as a high priority.



> Other languages are right-to-left (or even top-down, then left-to-right)


Yes, we haven't tackled those yet.


> So, why not turn everything into unicode at the paraparser level

> and then encode to 8-bit only when actually writing the PDF?

> If not for RL 2.2.1, then you should schedule it for one of the next

> RL releases.


Agreed. We didn't due to lack of time.


> There could well be two or more variations (read: classes) of a "Paragraph"

> which differ in

> * parsing (while RL understands a subset of HTML,

> another class could parse Wiki markup or whatever)

> * line-breaking

> * reading direction

> * rendering

> * splitting

> Most of this could be handled by mixin classes.

> This would require well-documented interfaces/data structures, however.


Yes. Another thing I want to tackle is use of epydoc / sphinx to
define the "official interface" to our package, BTW.


> For example, a SimpleParagraph might just accept text without layout

> tags (resulting in fast processing and small PDFs),

> while another paragraph class uses classic parsing, CJK-wrapping and

> the full-blown-up renderer.




> Though probably all this is not going to be easy,

> it should be possible to go there step by step, where the first steps

> should be documentation and the OO-refactoring I mentioned above.


I agree 100%.

Its a few weeks off internally for resource reasons, but if you want to submit a
refactored paragraph.py any sooner which leaves our test suite still working,
we'd be eternally grateful. Our energies are still going into
sideeffects of the
tree rearrangement, and then we have a new site to launch which will support
the user group a lot better. With our usual 102% of developer time going into
customer projects, that might mean a few weeks before we get onto
paragraphs or anything else "not obviously crashing"!

- Andy


More information about the reportlab-users mailing list