Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / July 2004

Tip: Looking for answers? Try searching our database.

Display a Word document in Java?

Thread view: 
IronMaster - 16 Jul 2004 23:36 GMT
Does anyone know of a way to display a Word document in a JEditorPane?

I can display an rtf document using the RTFEditorKit, so one method
might be to convert the Word document to rtf format, then display it.  
Is there an open source program to convert from Word format to rtf?
Roedy Green - 16 Jul 2004 23:55 GMT
>then display it.  
>Is there an open source program to convert from Word format to rtf?
Word itself saves in rtf format.

Does StarOffice eat Word and emit rtf?

Signature

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

Michel Guebel - 18 Jul 2004 17:01 GMT
Yes, StarOffice reads Microsoft Word documents, and saves documents in
Rich Text Format (.rtf).

Roedy Green a écrit :

>>then display it.  
>>Is there an open source program to convert from Word format to rtf?
>
> Word itself saves in rtf format.
>
> Does StarOffice eat Word and emit rtf?
Thomas Weidenfeller - 19 Jul 2004 09:10 GMT
> I can display an rtf document using the RTFEditorKit,

RTF support in Swing is limited. I suggest you first check if
RTFEditorKit is good enough for your application before setting up some
conversion from word to RTF.

/Thomas
Steve W. Jackson - 20 Jul 2004 14:07 GMT
>:IronMaster wrote:
>:> I can display an rtf document using the RTFEditorKit,
[quoted text clipped - 4 lines]
>:
>:/Thomas

Excellent advice that I must second.

All recent versions of Word support features that are beyond the
abilities of the existing RTFEditorKit.  Some result in content simply
being ignored, while I've encountered some situations that cause
exceptions to be thrown in our application.  There's been a longstanding
item in Sun's bug database requesting improved RTF support, but so far
nothing.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama

Trent - 31 Jul 2004 04:04 GMT
The other idea's are good.

My Java Law program loads RTF (I call them templates) files, replaces
a bunch of text, saves RTF file in a temp folder, sets at read only,
and then opens in the default WORD PROCESSOR (and they save as .doc or
.stx).

If you are using WORD, it does it own thing with RTF.  While my
program works great using any other word processor to make a template
and saving the template as RTF, if doing in WORD, I get random
results.

Using .DOC is a nightmare unless you are getting the .net stuff, plus
it is not open source, so cost a lot.

If you just want to display RTF, nothing in Java has worked well that
I have tried.  Maybe someone else has.

Have a Hoot!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.