Bug 47523

Summary: Cannot open output with MS Word
Product: POI Reporter: skaredla
Component: HWPFAssignee: POI Developers List <dev>
Status: RESOLVED INVALID    
Severity: major CC: skaredla
Priority: P1    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description skaredla 2009-07-13 15:38:05 UTC
I am trying to use HWPFDocument Java class to read/write a simple Word document. After writing with the HWPFDocument.write(OutputStream) method the word doc is unreadable by MS Word. It is just hanging there and not able to open the output file.
 
This is how I am writing the doc:

        HWPFDocument doc = new HWPFDocument(new FileInputStream(inputFile));
        FileOutputStream fos = new FileOutputStream(outputFile);
        doc.write(fos);
        fos.flush();
        fos.close();

 
Any help with this is greatly appreciated.
Can someone help me with this issue? I saw a similar issue in bugzilla with number #44431. Is there any resolution or workaround for this problem?
 
Please help.
 
Thanks
Srinivas
Comment 1 Yegor Kozlov 2011-06-25 12:38:38 UTC
Please attach the problematic file, without it we can't do much to help you.

Yegor
Comment 2 Javen O'Neal 2016-01-22 04:57:33 UTC
6 year old bug without enough information to reproduce.