81,122
社区成员




long startTime = System.currentTimeMillis();
InputStream in = new FileInputStream(new File( "D:/html/1.docx));
XWPFDocument document = new XWPFDocument( in );
XHTMLOptions options = XHTMLOptions.create();// .indent( 4 );
// Extract image
File imageFolder = new File( "D:/html/image/");
options.setExtractor( new FileImageExtractor( imageFolder ) );
// URI resolver
options.URIResolver( new FileURIResolver( imageFolder ) );
OutputStream out = new FileOutputStream( new File( "D:/html/1.html" ) );
XHTMLConverter.getInstance().convert( document, out, options );