word转html工具类 word网页发布转换工具 doc docx转换成网页工具类,从word中提取图片信息,并做处理
public class Word2Html {
private static Logger LOG = LoggerFactory.getLogger(Word2Html.class);
public static List<String> batchConvert(String path) {
List<String> result = new ArrayList<String>();
try {
File[] fs = new File(path).listFiles();
for (File f : fs) {
if (f.isFile() && f.getName().endsWith("doc") && !f.getName().startsWith("~")) {
String s = convert2Html(f);
result.add(s);
}
}
} catch (TransformerException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (ParserConfigurationExcept