Can we add an image to a pdf generated by the jsPDF library in titanium/android? Simple text is printing nicely but want to know is there any way of adding and displaying image in generated pdf.Here is the small example i am using:
var doc = new jsPDF(); doc.text(20, 20, 'Hello world!'); doc.text(20, 30, 'This is client-side Javascript, pumping out a PDF.'); doc.addPage(); doc.text(20, 20, 'Do you not like that test2?'); var res = doc.output(); var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'auther.pdf'); file.write(res); var pdfview = Ti.UI.createWebView({width:'100%',height:'100%',data:file}); var win = Ti.UI.createWindow(); win.add(pdfview);Ali