模板网站的建设,wordpress博客常用插件,郑州电力高等专科学校宿舍,溧阳网站建设制作项目介绍 基于wopi协议开发的WopiHost, 支持word, excel#xff0c;ppt(仅支持预览)等文档的预览和编辑。 运行环境 需要安装Office online 2016才可以使用#xff0c;基于jdk 1.8#xff0c;spring boot开发。 使用案例 word文档预览 http://[owas.domain]/wv/wordviewerfr…项目介绍 基于wopi协议开发的WopiHost, 支持word, excelppt(仅支持预览)等文档的预览和编辑。 运行环境 需要安装Office online 2016才可以使用基于jdk 1.8spring boot开发。 使用案例 word文档预览 http://[owas.domain]/wv/wordviewerframe.aspx?WOPISrchttp://[WopiHost.domain]:8080/wopi/files/test.docxaccess_token123 word文档编辑 http://[owas.domain]/we/wordeditorframe.aspx?WOPISrchttp://[WopiHost.domain]:8080/wopi/files/test.docxaccess_token123 excel预览 http://[owas.domain]/x/_layouts/xlviewerinternal.aspx?uizh-CNrszh-CNWOPISrchttp://[WopiHost.domain]:8080/wopi/files/test.xlsxaccess_token123 excel编辑 http://[owas.domain]/x/_layouts/xlviewerinternal.aspx?edit1WOPISrchttp://[WopiHost.domain]:8080/wopi/files/test.xlsxaccess_token123 ppt预览 http://[owas.domain]/p/PowerPointFrame.aspx?PowerPointViewReadingViewWOPISrchttp://[WopiHost.domain]:8080/wopi/files/test.pptxaccess_token123 ppt编辑 http://[owas.domain]/p/PowerPointFrame.aspx?PowerPointViewEditViewWOPISrchttp://[WopiHost.domain]:8080/wopi/files/test.pptxaccess_token123 备注[owas.domain]是Office online 2016的ip地址[WopiHost.domain]是WopiHost服务的ip。 使用时替换成自己的服务地址将test.docx换成自己对应文件路径下的文件名。 常见问题 word文档仅支持.docx不支持.doc格式。ppt仅支持预览不支持编辑。如果wopihost的接口都没有问题但是不能预览或者编辑文档可能wopi和Office Web Apps Server之间的网络不能互通也可能Office Web Apps Server有问题建议重新安装后重试。access_token没有做校验需要的自己实现一下。中文名字的文档不能预览、编辑将中文名使用URLEncoder.encode进行两次编码。例如哈哈哈.xlsx, 使用中文编码后的名字作为参数 .../wopi/files/%25e5%2593%2588%25e5%2593%2588%25e5%2593%2588.xlsx即可正常预览。转载于:https://www.cnblogs.com/luchaoshuai/p/9790544.html