why multiple image is not display?

794 views Asked by At

I am trying to display multiple images in a PDF using jspdf. It only shows the first image. It's not showing another image? Can we show multiple images using jspdf? Here is my code:

PLUNKER: http://plnkr.co/edit/HxharsFKeOPn2JgTb6pu?p=preview

var doc = new jsPDF();
doc.setFontSize(40);
doc.text(35, 25, "Paranyan loves jsPDF");
doc.addImage(imgData, 'JPEG', 15, 40, 180, 180, 'Octonyan');
doc.addImage('Octonyan', 'JPEG', 15, 400, 180, 180);
doc.save('Test.pdf');
1

There are 1 answers

0
Kirill Slatin On

You're adding an image outside of the page of a single-paged document The following works, mind the changed y coordinate 400 -> 220

doc.addImage(imgData1, 'JPEG', 15, 220, 180, 180);