Fork me on GitHub

word、excel、pdf等多种格式在线预览

 

第一种方式:

具体功能说明: http://view.xdocin.com/index.html

 

调用案例:

<a href="http://www.xdocin.com/xdoc?_func=to&_format=html&_cache=1&_xdoc=你的url" target="_blank" rel="nofollow">XDOC</a>

 

第二种方式:(我这边调用失败,显示Not Fund,暂不做研究)

 微软官方说明文档:https://www.microsoft.com/en-us/microsoft-365/blog/2013/04/10/office-web-viewer-view-office-documents-in-a-browser/

word、ppt、xls文件实现在线预览的方式比较简单可以直接通过调用微软的在线预览功能实现 (预览前提:资源必须是公共可访问的)


<iframe src='https://view.officeapps.live.com/op/view.aspx?src=你的url' width='100%' height='100%' frameborder='1'> </iframe>
posted @ 2021-09-09 17:45  WantRemake  阅读(250)  评论(0编辑  收藏  举报