aspose file tools
The moose likes Java in General and the fly likes issue in converting Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "issue in converting "\n" to a new line in the .rtf file using java code." Watch "issue in converting "\n" to a new line in the .rtf file using java code." New topic
Author

issue in converting "\n" to a new line in the .rtf file using java code.

Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
I'm putting different lines in the screen and trying to convert "\n" to new line in the RTF document but i'm getting as one line .rtf document not recognizing the new line char.
I'm converting each char to byte and putting in the byte array


and using the File Output Stream i'm printing on the document.

Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
I tried with BufferedWriter as well to write newline. But that is not working with .rtf files.

Can any one help me on this.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

RTF is different from text files. See AccessingFileFormats.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://jrebel.com/download
 
subject: issue in converting "\n" to a new line in the .rtf file using java code.
 
Similar Threads
split a file to original files
Quick String to <char> Array Conversion
problem in specifying file path
Write Binary File in Java to be read by a C Program and Vice Versa
Help with a chess program