I've written a web application to create and download a pdf document on client-side using jsPDF and Downloadify. jsPDF prepares the document and Downloadify downloads it as a pdf. Everything works fine.

I'm trying to replicate this behavior on a PhoneGap app (using FileWriter instead of Downloadify). FileWriter handles writing onto files. Using FileWriter, I've created txt files but couldn't create a pdf.

  1. Is is possible to create a PDF document using Cardova at all?
  2. If not are there any plugins around?
有帮助吗?

解决方案

  1. As of now (Cordova 2.8.0), I have concluded that there's no inbuilt API or plugins to create a pdf document usgin Cordova. I ended up creating PDF in server side using PHP plugin called tcpdf and downloading it in local file system.
  2. Again, as of now no. But to view pdf on local file system, there's FileOpener-Plugin

其他提示

  1. You can create PDF file using specific ( with Cordova support ) dll from the Apitron PDF kit package.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top