title: In Cordova Android, jsPDF addImage from Canvas Signature is not writing correctly when write to PDF file
body: <p>This is DataURL from SignaturePad</p>
  
  <pre><code>var imageURI = signaturePad.toDataURL();  
  </code></pre>
  
  <p>This is for Writing to PDF using jsPDF</p>
  
  <pre><code>var pdf = new jsPDF('p','pt','a4');
  var d = new Date().toISOString().slice(0, 19).replace(/-/g, "");
  var filename = 'sign_' + d + '.pdf';
  pdf.text(20, 20, 'YES, Inside of Cordova!');
  pdf.addImage(imageURI, 'PNG', 20, 50);
  pdf.save(filename);
  var pdfOutput = pdf.output();
  </code></pre>
  
  <p>This is for saving in Android</p>
  
  <pre><code>window.resolveLocalFileSystemURL(cordova.file.externalCacheDirectory, function(dir) {
     console.log("Access to the directory granted succesfully");
     dir.getFile('sign.pdf', {create:true}, function(file) {
        console.log("File created succesfully.");
        file.createWriter(function(fileWriter) {
           console.log("Writing content to file");
           fileWriter.write(pdfOutput);
        }, function(){
           alert('Unable to save file in path '+ cordova.file.externalCacheDirectory);
           }
       );
    });
  });
  </code></pre>
  
  <p>But the Signature is not correctly write in Pdf.</p>
  
  <p>when I draw in Signature
  <a href="https://i.stack.imgur.com/BWvpc.png" rel="nofollow noreferrer">when I draw in Signature</a></p>
  
  <p>but the Pdf in show
  <a href="https://i.stack.imgur.com/AYUjc.png" rel="nofollow noreferrer">but the Pdf in show</a></p>