久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='mjRq0'><tr id='mjRq0'><dt id='mjRq0'><q id='mjRq0'><span id='mjRq0'><b id='mjRq0'><form id='mjRq0'><ins id='mjRq0'></ins><ul id='mjRq0'></ul><sub id='mjRq0'></sub></form><legend id='mjRq0'></legend><bdo id='mjRq0'><pre id='mjRq0'><center id='mjRq0'></center></pre></bdo></b><th id='mjRq0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mjRq0'><tfoot id='mjRq0'></tfoot><dl id='mjRq0'><fieldset id='mjRq0'></fieldset></dl></div>

      • <bdo id='mjRq0'></bdo><ul id='mjRq0'></ul>

        <legend id='mjRq0'><style id='mjRq0'><dir id='mjRq0'><q id='mjRq0'></q></dir></style></legend>
      1. <tfoot id='mjRq0'></tfoot>

        <small id='mjRq0'></small><noframes id='mjRq0'>

      2. 在 ionic 2 應用程序中打開 PDF 文件

        Opening PDF file in ionic 2 app(在 ionic 2 應用程序中打開 PDF 文件)

        <tfoot id='rH5NG'></tfoot>
          • <legend id='rH5NG'><style id='rH5NG'><dir id='rH5NG'><q id='rH5NG'></q></dir></style></legend>

            <small id='rH5NG'></small><noframes id='rH5NG'>

                <tbody id='rH5NG'></tbody>

                  <bdo id='rH5NG'></bdo><ul id='rH5NG'></ul>

                  <i id='rH5NG'><tr id='rH5NG'><dt id='rH5NG'><q id='rH5NG'><span id='rH5NG'><b id='rH5NG'><form id='rH5NG'><ins id='rH5NG'></ins><ul id='rH5NG'></ul><sub id='rH5NG'></sub></form><legend id='rH5NG'></legend><bdo id='rH5NG'><pre id='rH5NG'><center id='rH5NG'></center></pre></bdo></b><th id='rH5NG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rH5NG'><tfoot id='rH5NG'></tfoot><dl id='rH5NG'><fieldset id='rH5NG'></fieldset></dl></div>

                • 本文介紹了在 ionic 2 應用程序中打開 PDF 文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試制作一個 ionic 2 應用程序.我有一個使用 jsPDF 生成的 pdf.

                  I am trying to make an ionic 2 app. I have a pdf generated using jsPDF.

                  相同的代碼是

                  var doc = new jsPDF();
                  doc.setFontStyle('Bold');
                  doc.setFontSize(14);
                  doc.text('Testing PDFs', 20, 20);
                  

                  現在我想保存在移動應用中打開的 PDF,

                  Now I want to save the open the PDF in the mobile app,

                  doc.output('save', 'tester.pdf'); 似乎在移動應用程序中不起作用.

                  but doc.output('save', 'tester.pdf'); doesn't seem to work in the mobile app.

                  請告訴我可以安裝哪個插件來查看和分享新制作的pdf.

                  Please can you tell me which plugin can I install so as to view and share the newly made pdf.

                  推薦答案

                  必須使用 jsPDF創建 PDF.然后,必須使用 blob 屬性將其轉換為應用程序可以使用的格式,以便在將其放在屏幕上之前允許在應用程序中傳遞.

                  One has to use jsPDF to create a PDF. Then one has to use blob attribute to convert it to the format that can be used by the application to allow passing in the app before putting it on screen.

                  在 blob 步驟之后,必須安裝 ng2-pdf-viewer 在命令行上通過命令npm install ng2-pdf-viewer --save 并使用 在移動應用程序屏幕上查看.

                  After the blob step, One has to install ng2-pdf-viewer on the command line by the command npm install ng2-pdf-viewer --save and use the <pdf-viewer> to view it on the mobile app screen.

                  確保在 import 語句中的 app.module.ts 文件和 @NgModule.

                  Make sure you import the the ng-pdf-viewer in the app.module.ts file in the import statements and in the @NgModule.

                  這是相同的代碼,

                  var doc = new jsPDF();
                  doc.setFontStyle('Bold');
                  doc.setFontSize(14);
                  doc.text('Testing PDFs', 20, 20);
                  var blob = doc.output('blob', {type: 'application/pdf'});
                  let pdfUrl = {pdfUrl: URL.createObjectURL(blob)};
                  let modal = this.navCtrl.push(ResumeView, pdfUrl);
                  

                  在簡歷視圖中

                  @Component({
                    selector: 'page-resume-view',
                    templateUrl: '<ion-content padding text-center>
                                     <pdf-viewer [src]="pdfUrl" 
                                                 [page]="page" 
                                                 [original-size]="false"
                                                 style="display: block;">
                  
                                      </pdf-viewer>
                                  </ion-content>',
                  })
                  export class ResumeView {
                    pdfUrl : String;
                    constructor(public navCtrl: NavController, public navParams: NavParams) {
                  
                    }
                  
                    ionViewDidLoad() {
                      console.log('ionViewDidLoad ResumeView');
                      this.pdfUrl = this.navParams.get('pdfUrl');
                     }
                  
                  }
                  

                  這篇關于在 ionic 2 應用程序中打開 PDF 文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                  anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                  Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數據更新 Observable)
                  Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                  In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創建使用 Ionic 組件的自定義指令?)
                  Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態元素 - Angular 2 amp;離子2)

                • <tfoot id='FJnv0'></tfoot>
                    <legend id='FJnv0'><style id='FJnv0'><dir id='FJnv0'><q id='FJnv0'></q></dir></style></legend>
                      <bdo id='FJnv0'></bdo><ul id='FJnv0'></ul>

                        <i id='FJnv0'><tr id='FJnv0'><dt id='FJnv0'><q id='FJnv0'><span id='FJnv0'><b id='FJnv0'><form id='FJnv0'><ins id='FJnv0'></ins><ul id='FJnv0'></ul><sub id='FJnv0'></sub></form><legend id='FJnv0'></legend><bdo id='FJnv0'><pre id='FJnv0'><center id='FJnv0'></center></pre></bdo></b><th id='FJnv0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FJnv0'><tfoot id='FJnv0'></tfoot><dl id='FJnv0'><fieldset id='FJnv0'></fieldset></dl></div>
                      1. <small id='FJnv0'></small><noframes id='FJnv0'>

                            <tbody id='FJnv0'></tbody>
                          1. 主站蜘蛛池模板: 婷婷丁香激情 | 亚洲成人精品 | 国产一区二区久久久 | 亚洲午夜三级 | 999热在线视频 | 欧美区在线| 一区二区日韩 | 国产色 | 久久精品 | 91av导航| 欧美小视频在线观看 | 免费99精品国产自在在线 | av在线免费观看网址 | 国产大片黄色 | 精品自拍视频 | 国产精品资源在线 | 亚洲一区二区久久 | 日韩av一区二区在线观看 | 久久91av| 伊人性伊人情综合网 | 亚洲视频一区 | 日韩电影免费在线观看中文字幕 | 久久久久久国产精品免费免费 | 欧美成人免费在线 | 日韩不卡在线观看 | 欧洲色综合 | 精品综合网 | 国产精品久久久久久亚洲调教 | 99精品免费| 国产免费麻豆视频 | 精品欧美一区二区三区免费观看 | 成人国产精品久久久 | 久久久久国产 | 日本免费一区二区三区 | 亚洲国产午夜 | 久久机热 | 午夜影院 | 欧美日韩在线成人 | 中文字幕在线播放第一页 | 亚州精品天堂中文字幕 | 日本在线网址 |