Hi,

We've put mind to txt-rendering. :) Evidently converting to txt isn't
implemented yet. So, before code writing, it will be useful to discuss
different approaches of implementing it. By this moment we've found 3
possible basic approaches.
Here they are:
1) 
TxtRender extends AbstractRender and try to render AbstractTreeModel to txt
format. This approach similar to PDF. But unfortunately txt format is much
less flexible than PDF. 
Thus we need to modify area tree model in order to render it to txt format.

Details:
TxtRender extends AbstractRender and overloads some methods which process
model.

2)
The second idea is similar to RTF approach. TxtHandler extends
FOEventHandler and handles formatting objects by his own without
AreaTreeModel.
This doesn't allow us to use advantages of LayoutManager, for example lines
fragmentation.

3) 
The third approach consist of modifying formatting objects before
constructing area tree model.

After getting formatting objects we make a refinement consisting of some
procedures. One of them is converting font's attributes to default value
which most appropriate for txt render. As we have already realized its
Courier 10.

Details:
TxtHandler extends AreaTreeHandler and overloads only one method -
endPageSequence where refinement takes place.
TxtRender extends AbstractRender and overloads some methods which process
model. 
But unlike first approach we have to do much less because LayoutManager gets
modified formatting objects and returns better result.

We started developing third approach.

Good luck.

Reply via email to