It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes RTF and Word 2002 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "RTF and Word 2002" Watch "RTF and Word 2002" New topic

RTF and Word 2002

Timo Wiedenmann

Joined: Aug 20, 2003
Posts: 6
Hi there,
a customer reported a problem concering RTF format of MS Word 2002:
The standard RTFEditorKit is no longer able to read the RTF files
generated by Word 2002, there is a naughty exception commin up ...
So my question: Does anyone of u can give me a hint how to solve the problem
or does anyone know a workaround ?
The only hint I found til now is here:
Java Tech Center
The application worked for years ... Thanx Microsoft !!!
So then - waiting for input ...
Yours Timo
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Can you find the differences between Word_old_rtf and Word_new_rtf?
Perhaps you may preformat the new style to the old style, and open it in the old style?
Timo Wiedenmann

Joined: Aug 20, 2003
Posts: 6
thanks for reply !!
Thats what I'm actually doin' ...
At the moment it looks like the new format contains much more
information (like a .DOC document) like styles, fonts and so on.
There is even user information stored in the new format (How created
the document, how saved it last, etc.).
The problem for the java RTFEditorKit is contained in a section called {\sytlesheet ...}, so I try to wrap the input stream for the RTF parser
and delete this section.
Hope to get my code / example working today.
Have a nice day ...
Timo Wiedenmann

Joined: Aug 20, 2003
Posts: 6
Okay folks,
I did it on my own
See the workaround at JTC ...
But this is only a workaround, if you want to help getting the bug fixed
go to Bug Parade and vote !!
Well then - have a nice day ...
I agree. Here's the link:
subject: RTF and Word 2002
It's not a secret anymore!