1.直接pdf链接形式
![](https://img.haomeiwen.com/i8478000/bee24a66f7ed8ac9.png)
2.文件返回pdf流的形式如图所示是关键,拿到之后
const blob = new Blob([pdfData], {type: 'application/pdf'})// data为文件流数据
let url = window.URL.createObjectURL(blob)
console.log("pdfDatapdfData",url)
this.url='/hybrid/html/web/viewer.html?file='+encodeURIComponent(url)
![](https://img.haomeiwen.com/i8478000/41a65e275db079f2.png)
网友评论