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