office online preview and editor
基于 wopi 协议开发的 WopiHost , 支持 word, excel,ppt, pdf(仅支持预览)等文档的预览和编辑。
需要安装 Office online 2016 才可以使用,基于jdk 1.8,spring boot开发。
在 application.properties 中配置文档的存储路径
file.path=E:\\
https://github.com/ethendev/data/blob/master/wopihost/20170418114309314.png型的请求路径。
word文档预览 https://raw.githubusercontent.com/ethendev/data/master/wopihost/20170418172425910.pngiles/test.docx
word文档编辑
https://raw.githubusercontent.com/ethendev/data/master/wopihost/20170418172534332.pngiles/test.docx
excel预览
http://[owas.domain]/x/_layouts/xlviewerinternal.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=http://[WopiHost.IP]:8080/wopi/files/test.xlsx
excel编辑
http://[owas.domain]/x/_layouts/xlviewerinternal.aspx?edit=1&WOPISrc=http://[WopiHost.IP]:8080/wopi/files/test.xlsx
ppt预览 http://[owas.domain]/p/PowerPointFrame.aspx?PowerPointView=ReadingView&WOPISrc=http://[WopiHost.IP]:8080/wopi/files/test.pptx
ppt编辑
http://[owas.domain]/p/PowerPointFrame.aspx?PowerPointView=EditView&WOPISrc=http://[WopiHost.IP]:8080/wopi/files/test.pptx
备注:[owas.domain] 是 Office online 2016 的地址,[WopiHost.IP]是 WopiHost 服务的 IP 地址。 使用时替换成自己相应的服务地址。
Unable to Open the File