wuqilang

没有get到 vue-pdf、pdfjs-dist 的好,直接使用pdfjs插件。

 

pdfjs使用教程:

  1、官网下载压缩包:http://mozilla.github.io/pdf.js/getting_started/#download(下载稳定版)

    

  2、将下载下来的文件解压缩后,将里面的pdf文件夹拷贝到项目中的public文件夹中

    

  3、访问地址: /pdf/web/viewer.html?file=       scope.row.certificateUrl----是文件的地址

          <div class="show-certificat-img" v-else>
            <a :href="\'/pdf/web/viewer.html?file=\'+scope.row.certificateUrl" target="_blank">{{scope.row.fileName}}</a>
          </div>

   4、效果:功能很全的pdf预览

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-22
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-09-01
猜你喜欢
  • 2022-01-01
  • 2021-08-22
  • 2021-09-15
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案