Package org.apache.poi.hwpf.converter
Class WordToTextConverter
java.lang.Object
org.apache.poi.hwpf.converter.AbstractWordConverter
org.apache.poi.hwpf.converter.WordToTextConverter
-
Constructor Summary
ConstructorsConstructorDescriptionCreates new instance ofWordToTextConverter.WordToTextConverter(TextDocumentFacade textDocumentFacade) WordToTextConverter(Document document) Creates new instance ofWordToTextConverter. -
Method Summary
Modifier and TypeMethodDescriptiongetText()static Stringstatic StringgetText(HWPFDocumentCore wordDocument) static StringgetText(DirectoryNode root) booleanstatic voidJava main() interface to interact withWordToTextConvertervoidprocessDocumentPart(HWPFDocumentCore wordDocument, Range range) voidsetOutputSummaryInformation(boolean outputDocumentInformation) Methods inherited from class org.apache.poi.hwpf.converter.AbstractWordConverter
getFontReplacer, getPicturesManager, processDocument, setFontReplacer, setPicturesManager
-
Constructor Details
-
WordToTextConverter
Creates new instance ofWordToTextConverter. Can be used for output severalHWPFDocuments into single text document.- Throws:
ParserConfigurationException- if an internalDocumentBuildercannot be created
-
WordToTextConverter
Creates new instance ofWordToTextConverter. Can be used for output severalHWPFDocuments into single text document.- Parameters:
document- XML DOM Document used as storage for text pieces
-
WordToTextConverter
-
-
Method Details
-
getText
- Throws:
Exception
-
getText
- Throws:
Exception
-
getText
- Throws:
Exception
-
main
Java main() interface to interact withWordToTextConverterUsage: WordToTextConverter infile outfile
Where infile is an input .doc file ( Word 95-2007) which will be rendered as plain text into outfile- Throws:
Exception
-
getDocument
- Specified by:
getDocumentin classAbstractWordConverter
-
getText
- Throws:
Exception
-
isOutputSummaryInformation
public boolean isOutputSummaryInformation() -
processDocumentPart
-
setOutputSummaryInformation
public void setOutputSummaryInformation(boolean outputDocumentInformation)
-