久久久久久久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. 主站蜘蛛池模板: 国产精品视频中文字幕 | 麻豆久久久9性大片 | 日本欧美在线观看视频 | 欧美日韩成人影院 | 91精品国产高清久久久久久久久 | 日韩在线第一 | 久久久久久亚洲精品 | 欧美1区2区 | 久草色播 | 亚洲视频三 | 国产成人精品免费视频 | 一区二区三区四区国产 | www.国产| 国产91网址| 久久久久亚洲精品国产 | 鸡毛片 | 欧美a区 | 国产精品亚洲欧美日韩一区在线 | 国产精品久久欧美久久一区 | 精品久久一区二区三区 | av免费在线播放 | 日日网| 欧美精品在欧美一区二区少妇 | 亚洲91精品| 国产1区2区3区 | 国产91视频一区二区 | 国产一区在线免费 | 国产视频久久久 | 99国产精品一区二区三区 | 日韩在线一区二区三区 | 日韩中文字幕在线观看 | 日本羞羞影院 | 国产精品一区二区日韩 | a免费视频| 国产99精品 | 有码一区 | 做a网站| 日韩成人在线观看 | 超碰8| 午夜精品一区二区三区在线播放 | 国产精品亚洲一区二区三区在线观看 |