File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 2716
    
    6

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: 42264
    
  64
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 - my free Android networking tools app
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: 42264
    
  64
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there a way to merge 2 RTF document?