How to Identify the new line char in paragraph taht in word Doc using POI

Hai i am new to POI my Goal is to read the word document using POI.i achieved that. i can able to extract pictures and text.but my problem is to find the new line character in paragraph using HWPF.

here is my code:

POIFSFileSystem fs = new POIFSFileSystem(new BufferedInputStream(istream));

HWPFDocument hdoc=new HWPFDocument(fs);

FileInformationBlock FIB=hdoc.getFileInformationBlock();

List pTable=hdoc.getPicturesTable().getAllPictures();

Range r=hdoc.getRange();

for(int i=0;i<r.numParagraphs();i++)

{

Paragraph pra=r.getParagraph(i);

for(int j=0;j<pra.numCharacterRuns();j++)

{

CharacterRun crun=pra.getCharacterRun(j);

textval=pra.text();

}>

[751 byte] By [sakthikinga] at [2007-11-27 7:40:05]
# 1

Many times, there is no new line (unless there is some sort of list in the paragraph). Since Word (actually most editors now) word wraps automatically, the paragraph is usually (essentially) one long line that the editor wraps for you.

But, to tell you the truth, I don't see anywhere in that code where you are even attempting to find newline characters. What, exactly, are you trying to accomplish. I.e. what is your desired result (not the process you are envisioning to get there).

masijade.a at 2007-7-12 19:20:32 > top of Java-index,Java Essentials,Java Programming...
# 2
i want the paragraph text as like as in the word to my project i.e i need to align that paragraph in to my projrct like in word
sakthikinga at 2007-7-12 19:20:32 > top of Java-index,Java Essentials,Java Programming...
# 3
So read the paragraph from word and print the text of it into whatever you are using to display your text. The wordwrapping may be different, but I don't know that that makes any real difference.
masijade.a at 2007-7-12 19:20:32 > top of Java-index,Java Essentials,Java Programming...