移动端和PC端无插件预览PDF、OFD、Word、WPS等多种格式文档
1、XDOC文档预览服务 http://view.xdocin.com
1 //你的文档地址 2 var file = "https://view.xdocin.com/demo/view.docx"; 3 //XDOC文档预览服务地址 var xurl = "https://view.xdocin.com/xdoc?_xdoc="
4 var xurl = "http://view.xdocin.com/view?src=";
5 //传入文档地址
6 xurl += encodeURI(file);
7 //开始预览
8 window.open(xurl);
2、pfile文件助手 http://www.pfile.com.cn/
window.open('http://www.pfile.com.cn/api/profile/onlinePreview?url='+encodeURIComponent(“文档地址”));
1 //你的文档地址 2 var file = "https://view.xdocin.com/demo/view.docx"; 3 //XDOC文档预览服务地址 4 var xurl = "http://www.pfile.com.cn/api/profile/onlinePreview?url="; 5 //传入文档地址 6 xurl += encodeURI(file); 7 //开始预览 8 window.open(xurl);
3、office online
1 https://view.officeapps.live.com/op/view.aspx?src=你的地址(一定得是全路径,带http的那种)
4、kkFileView https://kkfileview.keking.cn/zh-cn/docs/build.html
5、officeweb365.com https://officeweb365.com/