poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chris.b" <omelhornomedomu...@gmail.com>
Subject Re: Problem with word documents
Date Thu, 29 Nov 2007 09:38:50 GMT

i found a simpler way round this, i read somewhere that open office simply
converted .rtf files to .doc, so i just handle it using the rtf handler, but
i wanted to do it so it would try handling it with poi, in case it catches a
IllegalPropertySetDataException, to handle it with rtf handler, but it
always gives me the exception...

Example of what i'm trying to do:

        try {
        	content = docextractor.getText();		
        } catch (IllegalPropertySetDataException ipsde) {
        	try {
        		DefaultStyledDocument styledDoc = new DefaultStyledDocument();
        		new RTFEditorKit().read(fisdoc, styledDoc, 0);
        		content = styledDoc.getText(0, styledDoc.getLength());
        	} catch (BadLocationException ble) {
        	finally {

I don't know if there's any "bad programming in this", for now i just wanted
it to work :p

thank you, 

View this message in context: http://www.nabble.com/Problem-with-word-documents-tf4877644.html#a14022202
Sent from the POI - User mailing list archive at Nabble.com.

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

View raw message