poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31498] New: - Word file created by HWPFDocument.write(FileOutputStream) has no content
Date Thu, 30 Sep 2004 19:06:16 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31498>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31498

Word file created by HWPFDocument.write(FileOutputStream) has no content

           Summary: Word file created by
                    HWPFDocument.write(FileOutputStream) has no content
           Product: POI
           Version: 2.0-dev
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: POI Overall
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: mark.thurston@aruplab.com


I tried the following code:

try {

	HWPFDocument doc = new HWPFDocument(new FileInputStream 
("c:\\test.doc")); 
	Range r = doc.getRange(); 
	 
	r.insertAfter( "this is the text that I wanna insert "); 
	OutputStream out = new FileOutputStream("c:\\test1.doc"); 
	doc.write(out); 
	 
	out.flush(); 
	out.close(); 
}
catch (Exception ex) {
	ex.printStackTrace();
}

And then tried to open the Word file using Word from Office 2003 and there was 
no content.  So I then opened the file in a hex editor and noticed that the 
text was in the file, but it was not showing up in Word.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message