<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 134: Java can't write RTF w/o losing formatting</title><link>https://sourceforge.net/p/thdltools/bugs/134/</link><description>Recent changes to 134: Java can't write RTF w/o losing formatting</description><atom:link href="https://sourceforge.net/p/thdltools/bugs/134/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sun, 13 Feb 2005 02:31:17 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/thdltools/bugs/134/feed.rss" rel="self" type="application/rss+xml"/><item><title>Java can't write RTF w/o losing formatting</title><link>https://sourceforge.net/p/thdltools/bugs/134/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Many of our converters output Rich Text Format (RTF). &lt;br /&gt;
Java's support for this, the RTFEditorKit class, has&lt;br /&gt;
many problems.  This means that our ACIP-&amp;gt;TMW, TM-&amp;gt;TMW,&lt;br /&gt;
TMW-&amp;gt;TM, TMW-&amp;gt;Unicode.rtf, and other RTF-&amp;gt;* or *-&amp;gt;RTF&lt;br /&gt;
conversions have problems.  (And I checked thoroughly&lt;br /&gt;
-- if we read it in with RTFEditorKit into a&lt;br /&gt;
TibetanDocument and write it out with an RTFEditorKit&lt;br /&gt;
after doing nothing else at all, we have problems.)&lt;/p&gt;
&lt;p&gt;The major problem is that formatting is lost.  Text&lt;br /&gt;
that was centered is no longer.  Indention is lost. &lt;br /&gt;
Whitespace is important, so this stinks.&lt;/p&gt;
&lt;p&gt;I don't think this is a priority for Sun.&lt;/p&gt;
&lt;p&gt;OpenOffice.org has C++ classes that support RTF.  Wylie&lt;br /&gt;
Word hopefully doesn't have this problem either.&lt;/p&gt;
&lt;p&gt;But in Java, I'm not sure how we solve this.  It seems&lt;br /&gt;
like reading RTF is the problem more so than writing&lt;br /&gt;
RTF.  Many Java utilities can write RTF, jrtf and some&lt;br /&gt;
sort of XSL-FO-&amp;gt;RTF tool e.g.&lt;/p&gt;
&lt;p&gt;Yet if reading is the problem, then how come Jskad can&lt;br /&gt;
display the formatting properly in its GUI?  The&lt;br /&gt;
TibetanDocument object seems to be okay, but its&lt;br /&gt;
writeRTFOutputStream method doesn't work well.&lt;/p&gt;
&lt;p&gt;Maybe jrtf or the like has some better way to turn a&lt;br /&gt;
Document into RTF.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David L. Chandler</dc:creator><pubDate>Sun, 13 Feb 2005 02:31:17 -0000</pubDate><guid>https://sourceforge.net63b4eb5d4fe14e2879dc9b6bcc419751008a8218</guid></item></channel></rss>