Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8851

Re: How to generate a pdf file using javascript?

$
0
0

here is my code:

var imgData = arrData['employee'][1]['Image'];

  var doc = new jsPDF();

   doc.setFontSize(40);

  doc.text(35, 25, "Text Header");

  doc.addImage(imgData, 'JPEG', 15, 40, 180, 160);

 

getting exception:

Uncaught Error: getJpegSize could not find the size of the image

 

exception is occurring at 5th line


Viewing all articles
Browse latest Browse all 8851

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>