下载:

$http.get('/receivePDFUrl', {responseType: 'arraybuffer'}) // 设置$http get请求的responseType为arraybuffer
 .success(function(data){
  var file = new Blob([data], {type: 'application/pdf'}); // 使用Blob将PDF Stream 转换为file
  var fileUrl = URL.createOjectURL(file);
  window.open(fileUrl); // 在新的页面中打开PDF
 })

 

相关文章:

  • 2021-12-26
  • 2021-08-20
  • 2022-12-23
  • 2022-01-08
  • 2021-09-30
  • 2021-04-22
  • 2021-10-08
猜你喜欢
  • 2021-11-27
  • 2021-10-15
  • 2021-12-26
  • 2021-09-03
  • 2022-01-05
  • 2021-12-26
  • 2021-12-26
相关资源
相似解决方案