项目介绍

基于wopi协议开发的WopiHost, 支持word, excel,ppt(仅支持预览)等文档的预览和编辑。

运行环境

需要安装Office online 2016才可以使用,基于jdk 1.8,spring boot开发。

使用案例

word文档预览

http://[owas.domain]/wv/wordviewerframe.aspx?WOPISrc=http://[WopiHost.domain]:8080/wopi/files/test.docx&access_token=123 

word文档编辑

http://[owas.domain]/we/wordeditorframe.aspx?WOPISrc=http://[WopiHost.domain]:8080/wopi/files/test.docx&access_token=123 

excel预览

http://[owas.domain]/x/_layouts/xlviewerinternal.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=http://[WopiHost.domain]:8080/wopi/files/test.xlsx&access_token=123

excel编辑

http://[owas.domain]/x/_layouts/xlviewerinternal.aspx?edit=1&WOPISrc=http://[WopiHost.domain]:8080/wopi/files/test.xlsx&access_token=123

ppt预览

http://[owas.domain]/p/PowerPointFrame.aspx?PowerPointView=ReadingView&WOPISrc=http://[WopiHost.domain]:8080/wopi/files/test.pptx&access_token=123

ppt编辑

http://[owas.domain]/p/PowerPointFrame.aspx?PowerPointView=EditView&WOPISrc=http://[WopiHost.domain]:8080/wopi/files/test.pptx&access_token=123

备注:[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即可正常预览。

wopihost的更多相关文章

  1. office web apps部署(二)

    1.安装composer 参考 http://docs.phpcomposer.com/00-intro.md 根据系统选择安装方式 修改php.ini   去掉extension=php_opens ...

  2. office web apps 整合Java web项目

    之前两篇文章将服务器安装好了,项目主要的就是这么讲其整合到我们的项目中,网上大部分都是asp.net的,很少有介绍Java如何整合的,经过百度,终于将其整合到了我的项目中. 首先建个servlet拦截 ...

  3. Asp.net与office web apps的整合

    其实网上有关office web app的整合已经有相关的文章了,典型的是如何整合Office Web Apps至自己开发的系统(一) 和如何整合Office Web Apps至自己开发的系统(二), ...

  4. office online server部署和简单操作

    office online server是Office Web Apps Server的升级版本,安装环境必须为 Windows Server 2012 R2 参考地址:https://technet ...

  5. office web app server部署和简单操作

    部署环境:windows server 2012 R2,服务器在AD域中 参考网址: https://msdn.microsoft.com/zh-cn/magazine/jj219455(office ...

  6. 微软office web apps 服务器搭建之在线文档预览(二)

    上一篇文章已经介绍了整个安装过程了.只要在浏览器中输入文档转换server的ip,会自动跳转,出现如下页面. 那么就可以实现本地文档预览了,你可以试试.(注意:是本地哦,路径不要写错,类似“\\fil ...

  7. 最近在折腾在线编辑,研究了下Wopi,下面粘贴出自己Office Online Server2016搭建与部署

    至少需要两台服务器,一台域控制器,一台部署Office Online Server https://docs.microsoft.com/zh-cn/officeonlineserver/office ...

  8. Office Online Server2016搭建与部署(在线编辑)

    至少需要两台服务器,一台域控制器,一台部署Office Online Server https://docs.microsoft.com/zh-cn/officeonlineserver/office ...

随机推荐

  1. php 页面 不显示任何错误提示

    error_reporting(0); ini_set('html_errors',false); ini_set('display_errors',false);

  2. C#中的Dictionary类,默认key是区分大小写的

    在C#中定义一个Dictionary Dictionary<string,string> dictionary = new Dictionary<string,string>( ...

  3. jvm间歇性崩溃分析

    http://www.cnblogs.com/LBSer/p/4417148.html 1 问题描述 某服务有两台机器,每隔几天会报警load高,一开始看监控发现gc时间抖动很大,以为是发生了full ...

  4. nginx 学习笔记(5) nginx调试日志

    为启动一个调试日志,nginx需要在构建时配置城支持调试模式. ./configure --with-debug ... 而且调试级别应该使用err_log指令来设置: err_log /path/t ...

  5. grafana安装

    1 wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.4-1.x86_64.rpm2 sudo ...

  6. 合天misc100

    打开txt文件是一串RGB颜色值 用len(file.readlines()),发现颜色值有61366个,能分解成122*503 from PIL import Image length = 122 ...

  7. nginx重启报错:nginx: [error] invalid PID number "" in "/run/nginx.pid"

    问题描述:执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number “” in “/run/ngin ...

  8. saas模式

    SaaS是Software-as-a-service(软件即服务).SaaS提供商为企业搭建信息化所需要的所有网络基础设施及软件.硬件运作平台,并负责所有前期的实施.后期的维护等一系列服务,企业无需购 ...

  9. thinkphp 查询单个“年-月-日” FROM_UNIXTIME

    *时间格式转换,使datetimepicker.js 能够搜索 查询 单个 年月日而不需是区间 查询. //另起一行看转换结果 select *,FROM_UNIXTIME(CreateTime,'% ...

  10. The request sent by the client was syntactically incorrect.

    HTTP Status 400 - type Status report message description The request sent by the client was syntacti ...