Hello everyone.

I'm having a very strange problem regarding reading and writing doc files
using POI 3.5. The doc is written, but some elements become unformatted
(like tables!).

In attachment i send my simple doc file, and the code i'm executing is the
following code:

                File file = new File("simple.doc");
                HWPFDocument document = new HWPFDocument(new 
FileInputStream(file));
                File outputFile = new File("output-" + filename);
                FileOutputStream outStream = new FileOutputStream(outputFile);
                try {
                        document.write(outStream);
                } finally {
                        outStream.close();
                }
                System.out.println("Check file output: " + 
outputFile.getAbsolutePath());

Now... here comes the strange part... If i use POI 3.2, the doc is well
written. Does anyone already tested POI 3.5 with doc files?

Thanks for you help.

Best regards
João Simas http://www.nabble.com/file/p26025879/simple.doc simple.doc 

-- 
View this message in context: 
http://www.nabble.com/Problems-reading-and-writing-doc-files-in-POI-3.5-tp26025879p26025879.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to