如何将html2pdf的pdf输出保存到ionic中的文件夹

时间:2019-03-27 06:14:26

标签: angular ionic-framework ionic4 ionic-native html2pdf

使用html2pdf插件,我将div转换为pdf并下载了它,这在浏览器中运行良好。

但是,当我尝试在安装的Ionic应用程序中执行相同操作时,它并没有下载文件。

html2pdf(document.getElementById("orderConfirmation"), {
      margin: 1,
      filename: 'order.pdf',
      image: { type: 'jpeg', quality: 0.98 },
      html2canvas: { scale: 2 },
      jsPDF: { unit: 'cm', format: 'a4', orientation: 'portrait' }
    }).save();

我该如何使其同样适用于离子应用程序?

0 个答案:

没有答案