Package org.apache.poi.hwpf.converter
Class WordToHtmlConverter
- java.lang.Object
-
- org.apache.poi.hwpf.converter.AbstractWordConverter
-
- org.apache.poi.hwpf.converter.WordToHtmlConverter
-
@Beta public class WordToHtmlConverter extends AbstractWordConverter
Converts Word files (95-2007) into HTML files.This implementation doesn't create images or links to them. This can be changed by overriding
AbstractWordConverter.processImage(Element, boolean, Picture)
method.
-
-
Constructor Summary
Constructors Constructor Description WordToHtmlConverter(HtmlDocumentFacade htmlDocumentFacade)
WordToHtmlConverter(org.w3c.dom.Document document)
Creates new instance ofWordToHtmlConverter
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.Document
getDocument()
static void
main(java.lang.String[] args)
Java main() interface to interact withWordToHtmlConverter
void
processDocumentPart(HWPFDocumentCore wordDocument, Range range)
-
Methods inherited from class org.apache.poi.hwpf.converter.AbstractWordConverter
getFontReplacer, getPicturesManager, processDocument, setFontReplacer, setPicturesManager
-
-
-
-
Constructor Detail
-
WordToHtmlConverter
public WordToHtmlConverter(org.w3c.dom.Document document)
Creates new instance ofWordToHtmlConverter
. Can be used for output severalHWPFDocument
s into single HTML document.- Parameters:
document
- XML DOM Document used as HTML document
-
WordToHtmlConverter
public WordToHtmlConverter(HtmlDocumentFacade htmlDocumentFacade)
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException
Java main() interface to interact withWordToHtmlConverter
Usage: WordToHtmlConverter infile outfile
Where infile is an input .doc file ( Word 95-2007) which will be rendered as HTML into outfile
- Throws:
java.io.IOException
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerException
-
getDocument
public org.w3c.dom.Document getDocument()
- Specified by:
getDocument
in classAbstractWordConverter
-
processDocumentPart
public void processDocumentPart(HWPFDocumentCore wordDocument, Range range)
-
-