Is it possible to create PDFs using jspdf on mobile phones and tablets? I have a basic android application (without Phonegap or Cordova) and an IOS application. While jspdf functions smoothly on web browsers, I am unable to generate PDFs on both IOS and Android.
doc.output('save', 'Pass.pdf');
This code works well for web browsers. However, when I tried:
doc.save();
and
var blob = pdf.output();
window.open(URL.createObjectURL(blob));
and when I attempted :
var res = doc.output();
var blob = new Blob([res]);
window.open(URL.createObjectURL(blob));
I received something like this on the android device:
onLoadResource=data:application/pdf;base64,JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291cmNlcyAyIDAgUgovTWVkaWFCb3ggWzAgMCA1OTUuMjggODQxLjg5XQovQ29udGVudHM......
but no actual PDF file was generated.
Now I am wondering if it is actually feasible to create PDFs on mobile devices using jspdf, or if my efforts are futile.
If so, how can it be achieved?