提示:预览是通过后台转pdf到前台展示的过程,当然网上也有购买的api
举个栗子:(http://www.officeweb365.com/)
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>demo</title> </head> <body> <a href="http://ow365.cn/?i=12200&furl=http://files.cnblogs.com/files/zhaozhou/新建zz.pptx" target="_blank">点我预览</a> </body> </html>
其他类型的文档查看类似,注意调用接口和参数就好。
举个栗子:(微软官方供应)查看不需要花钱
<!doctype html> <html> <head> <title>draggable</title> </head> <body> <iframe src='https://view.officeapps.live.com/op/view.aspx?src=http://files.cnblogs.com/files/zhaozhou/新建zz.pptx' width='1366px' height='623px' frameborder='0'> </iframe> </body> </html>
注意:不需要花钱并不代表能更省,在服务器配置的时候,需要安装和环境都有严格要求