Can Cordova 'FileWriter' create/download a PDF document?

749 views Asked by At

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?
2

There are 2 answers

0
Sushan Ghimire On BEST ANSWER
  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
0
stanlyF On
  1. You can create PDF file using specific ( with Cordova support ) dll from the Apitron PDF kit package.