服务器只是存文件的,装不装又没关系
访问的客户端装office不就行了么?
访问的客户端装office不就行了么?
解决方案 »
- EJB引用 一个接口有两个实现类,怎么确定是哪一个?
- sqlserver2000更新数据库速度特别慢
- 急急呀,借人气求救,装solaris系统出现grub提示符怎么解决呢?
- spring 初级使用的问题(ClassPathResource).
- xstream对象转xml遇到特殊字符怎么处理方便些 在线等
- jb+wl+sql server开发ejb出现这个异常,咋整?
- 有人用过liferay开发portlet嘛,进来帮帮忙。
- JSP 编译问题 2 这是修改后的,小女谢过了!在线等!!!!!!!!!!!!!!!!!!!!!!!!!
- 请问struts中的ActionForm可否当成一个存放多个session值的容器来使用?
- 用weblogic开发ejb的问题?: Could not obtain an exclusive lock to the embedded LDAP data files directory
- 有没有类似于CSDN的外文IT社区网站?
- XFIRE客户端调用AXIS服务端SERVICE传W3Cdocument接收格式不对
老大要求客户端不装office也要能看
DocumentBuilderFactory.newInstance().newDocumentBuilder()
.newDocument());
wordToHtmlConverter.processDocument(wordDocument);
Document htmlDocument = wordToHtmlConverter.getDocument();
ByteArrayOutputStream out = new ByteArrayOutputStream();
DOMSource domSource = new DOMSource(htmlDocument);
StreamResult streamResult = new StreamResult(out); TransformerFactory tf = TransformerFactory.newInstance();
Transformer serializer = tf.newTransformer();
serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
serializer.setOutputProperty(OutputKeys.METHOD, "html");
serializer.transform(domSource, streamResult);
out.close(); String result = new String(out.toByteArray());
System.out.println(result);
https://crocodoc.com/docs/api/
通过这个网站的API转成PDF
然后再转成图片显示出来
但有些缺点,免费用户只能同时转换两个文件,而且只支持word、excel、ppt和pdf文件,格式比较少
http://www.kuaipan.cn/developers/document.htm