Many of our converters output Rich Text Format (RTF).
Java's support for this, the RTFEditorKit class, has
many problems. This means that our ACIP->TMW, TM->TMW,
TMW->TM, TMW->Unicode.rtf, and other RTF->* or *->RTF
conversions have problems. (And I checked thoroughly
-- if we read it in with RTFEditorKit into a
TibetanDocument and write it out with an RTFEditorKit
after doing nothing else at all, we have problems.)
The major problem is that formatting is lost. Text
that was centered is no longer. Indention is lost.
Whitespace is important, so this stinks.
I don't think this is a priority for Sun.
OpenOffice.org has C++ classes that support RTF. Wylie
Word hopefully doesn't have this problem either.
But in Java, I'm not sure how we solve this. It seems
like reading RTF is the problem more so than writing
RTF. Many Java utilities can write RTF, jrtf and some
sort of XSL-FO->RTF tool e.g.
Yet if reading is the problem, then how come Jskad can
display the formatting properly in its GUI? The
TibetanDocument object seems to be okay, but its
writeRTFOutputStream method doesn't work well.
Maybe jrtf or the like has some better way to turn a
Document into RTF.
Logged In: YES
user_id=159335
The following might be slightly useful:
http://jakarta.apache.org/poi/
Can read Word files, but it seems quite experimental.
http://www.lowagie.com/iText/
Can write RTF but seemingly not from a TibetanDocument.
Can't read RTF.