1.0.2 • Published 5 years ago
pdf-show v1.0.2
1.引入html文件包,放入可以访问的路径下
2.npm i pdf-show
3.调用show_pdf(parmas,view_location)方法
var parmas = {
//模式(可以不传递,默认0)
pattern:0,
//请求类型GET(可以不传递,现在只支持GET)
requestType:"GET",
//获取pdf流的请求地址
requestUrl:pdfUrl,
//获取请求的认证信息
requestHeader:{'x-auth-token':token}
}
view_location:是访问到viewer.htmlt的访问地址