Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2539] how can i add image in PF

GitHub Issuen/a
Resolution Date2013-03-18T14:13:34.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsDocumentation, Titanium SDK & CLI
LabelsJSPDF, iphone, titanium
Reporterjayesh joshi
AssigneeShak Hossain


i am trying to add image in PDF generated using jsPDF for iPhone but i can not add image in PDF anyway...


  1. jayesh joshi 2013-03-18

    var file_iamge1 = Ti.Filesystem.getFile(Ti.Filesystem.getApplicationDataDirectory(), 'image1.jpg'); file_iamge1.write(painter.toBlob); var tempblob = file_iamge1.read(); var encoded = Ti.Utils.base64encode(tempblob); var strn = encoded.toString(); doc.addImage("data:image/jpeg;base64," + encoded, "JPEG", 10, 10, 154, 94); https://github.com/MrRio/jsPDF/blob/master/dist/jspdf.source.js in JSPDF file the error is getJpegSize could not find the size of the image
  2. Tony Lukasavage 2013-03-18

    This is likely a better question for the Q&A, not a ticket. Ask this in the Q&A and you'll likely get a response from someone who has done something similar before: http://developer.appcelerator.com/questions/newest
  3. Shak Hossain 2013-12-27

    Closing this since it is NOT a bug report. A recommendation on how to resolve this has been posted.

JSON Source