It's not a secret anymore!*
The moose likes General Computing and the fly likes Is there a way to merge 2 RTF document? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Is there a way to merge 2 RTF document?" Watch "Is there a way to merge 2 RTF document?" New topic
Author

Is there a way to merge 2 RTF document?

Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
Is there a way to merge 2 RTF document?


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2712
    
    5

Manually?
If yes then on Microsoft Word 2003 while saving a file you get an option to merge it with an existing file.


SCJP, SCWCD.
|Asking Good Questions|
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
What do you mean by "merge" - append them? In word processing, merge generally means to fill in data into an existing document, not to combine two documents.


Ping & DNS - updated with new look and Ping home screen widget
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
I meant append. I want to concatenate two RTF documents in a Java background thread.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
OpenOffice -which can be run as a GUI-less server, and has a Java API to access it that way- should be able to import and append RTF files.

I'm not aware of a Java library for handling RTFs, though. But RTF has a pretty simple syntax. It's not hard to write a parser for it, and for a limited subset or RTF -if you can make such an assumption- it may be feasible to append two files by text manipulation.
 
wood burning stoves
 
subject: Is there a way to merge 2 RTF document?
 
Similar Threads
How to convert a webpage to MS. word
RTF Merge
Best way to 'mail merge' rtf files (including images)
How to print a RTF document using java?
How To Read RTF file in JAVA? Using iText?