Core-13 / jsPDF-image-support

Adds image support to jsPDF when used in Titanium
Other
9 stars 6 forks source link

Image scaling on android #6

Open tvfoodmaps opened 10 years ago

tvfoodmaps commented 10 years ago

I have an image that i want to use for the background of an entire page. Here is my code:

var doc = new _jsPDF("l","mm","letter");
    doc.setProperties({
        title: 'Title',
        subject: 'This is the subject',     
        author: 'John Doe',
        keywords: 'one, two, three',
        creator: 'Someone'
    });

    var imgSample1 = Ti.Filesystem.resourcesDirectory + 'certblank.jpg';
    doc.addImage(imgSample1, 'JPEG', 0, 0, 279, 216);

On iOS this is working fine, on Android (my S5) the I only see the upper left corner of the image and its zoomed in. Is this related to the DPI of the device? I've tried testing some other options nothing seems to work.