I am using Flying Saucer for one of my projects and first of all my
kudos and thanks to the flying saucer team for a great product.
Recently I have been responsible for supporting Arabic in my
application and I have faced a few issues.
I followed this thread in this group
http://groups.google.com/group/flying-saucer-users/browse_thread/thread/9f409fb987e943a2.
That got me around to render the arabic text correctly,both direction
as well as ligatures.
But I would require the entire page to be filpped in the arabic mode.
My HTML contains tables and I would think the column positions should
be RTL for the page to be meaningful.
Here are a few thoughts. If someone will help me validate these
approaches and say whether it is worthwhile giving a try. I did not
want get to a wrong path and go too far before realizing it would not
work.
1) I can use a ReplacedElementFactory which can handle tables. Instead
of creating my own ReplacedElement, I would just change the positions
of the various coulmns within the BlockBox (TableBox) in this case and
delegate it back to the default ReplacedElementFactory. Here I am
expecting that the rendering will be normally processed and the Table
will be rendered alright.
2) Subclass the OutputDevice. This subclass will use an additional
transform when the language is arabic. Not sure if layout() will use
the transform for all elements. If it does, then the text drawing
could be adversly affected - simple transform will not work for BiDi
text ?
Tables is just an example, but I would want to do this every other
element in my HTML whose position on the page is affected by the
reading direction.
Thanks
Anupama