pdf预览----vue-pdf、pdfjs-dist、pdfjs插件


没有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预览

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM