You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by bib_lucene bib <bi...@yahoo.com> on 2006/03/24 08:53:29 UTC
POI-HWPF Word new line problem
Hi All
I am using POI HWPF. I am reading word document like this..
public String getText(InputStream is) throws Exception {
HWPFDocument wordDoc = new HWPFDocument(new POIFSFileSystem(is));
Range range = wordDoc.getRange();
return range.text();
}
I need to display the text in browser. New lines are not recognized and all the text is cooming as one blob.
Is there anyway I can recognize these newline charecters and replace. I tried String.replaceAll("\n", "<br>");
This does not work.
Please let me know.
bib/-
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.