pageoffice实现网页打开编辑保存word文档(基于SSM框架)
pageoffice是一款网页集成word.excel...等office工具
并不免费,但可以试用练习
SSM框架搭建过程就省略了
注意:由于谷歌/火狐升级,不支持插件嵌入,建议使用POBrowser.openWindowModeless 的方法启动pageoffice.
效果图:
![](http://upload-images.jianshu.io/upload_images/11207641-c64713bee08c796d.png?imageMogr2/auto-orient/strip|imageView2/2/w/1139/format/webp)
image.png
1.使用前准备
- demo下载地址
http://www.zhuozhengsoft.com/dowm/
-
postup.exe安装
image.png -
导入jar包:pageoffice.jar
image.png
理论上不需要印章功能下面两个不需要导入,我只用到了第一个jar包,用于导出word文档在线编辑并保存.
-
再web.xml中添加下面代码:
<!-- PageOffice Begin -->
<servlet>
<servlet-name>poserver</servlet-name>
<servlet-class>com.zhuozhengsoft.pageoffice.poserver.Server</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>poserver</servlet-name>
<url-pattern>/poserver.zz</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>poserver</servlet-name>
<url-pattern>/sealsetup.exe</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>poserver</servlet-name>
<url-pattern>/posetup.exe</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>poserver</servlet-name>
<url-pattern>/pageoffice.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>poserver</servlet-name>
<url-pattern>/jquery.min.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>poserver</servlet-name>
<url-pattern>/pobstyle.css</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>adminseal</servlet-name>
<servlet-class>com.zhuozhengsoft.pageoffice.poserver.AdminSeal</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>adminseal</servlet-name>
<url-pattern>/adminseal.zz</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>adminseal</servlet-name>
<url-pattern>/loginseal.zz</url-pattern>
</servlet-mapping>