سؤال

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