<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ### 介紹 `pdf.js`可以實現在`html`下直接瀏覽pdf文檔,是一款開源的`pdf`文檔讀取解析插件 `pdf.js`主要包含兩個庫文件,一個`pdf.js`和一個`pdf.worker.js`,,一個負責`API`解析,一個負責核心解析 * [下載地址](http://oritfw5nq.bkt.clouddn.com/pdf.zip) * [github](https://github.com/rkusa/pdfjs) ### 使用步驟 將文件解壓到`static`目錄下,在預覽頁面中使用,使用`iframe`訪問`static中web內的viewer.html`文件,`pdf`路徑通過參數傳遞,即可使用該插件訪問`pdf`文件 ```html <iframe class="pdf-viewer" :src='"/static/pdf/web/viewer.html?file=http://image.cache.timepack.cn/nodejs.pdf"' width="50%" height="800" scrolling="no"> 您的瀏覽器不支持PDF閱讀 </iframe> ``` ### 問題 `pdf`兼容`ie,firefox,chrome`等主流的瀏覽器,故瀏覽器兼容方面無需擔心.然后主要注意的是: 1. 源碼必須放在`static`目錄下作為靜態資源引入項目,不然會影響`webpack`編譯; 2. 訪問網絡`pdf`文件存在跨域問題,目前暫時是這樣配置:`Access-Control-Allow-Origin:*` ### 參考 1. https://www.cnblogs.com/jacksoft/p/5302587.html 2. https://github.com/lewiscutey/PDF/tree/gh-pages 3. https://github.com/rkusa/pdfjs 4. http://blog.csdn.net/xiao_bin_shen/article/details/77778514 <p class="over">Over!</p>
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看