首页 > Web开发 > 详细

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

时间:2020-06-02 16:16:40      阅读:891      评论:0      收藏:0      [点我收藏+]

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

技术分享图片

 

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

原文:https://www.cnblogs.com/wuqilang/p/13031290.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!